Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8049847
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T06:53:59+00:00 2026-06-05T06:53:59+00:00

I’m having some issues trying to insert a query into the database. I have

  • 0

I’m having some issues trying to insert a query into the database.
I have this php form that should do an insert query but nothing happens, not even an error.

This is an example query with the form:

INSERT INTO FlashVideoList ('title', 'urltitle', 'description', 'tags', 'category', 'filename', 'filetype', 'size', 'uploadedbyuser', 'uploadtime') VALUES ('testtitle','testtitle','test','testtags','FlashVideo','SMILE!.swf','application/x-shockwave-flash','1007525','0','1339102426'); 

i echoed the contents of the query to get this

This is the php code:

function MySqlQuery($Query)
{
    // Invokes global connection info
    global $MySQL_Host, $MySQL_Username, $MySQL_Password, $MySQL_Database, $MySQL_Port;
    global $mysqli;

    // runs query
    $result = $mysqli->query($Query);
    return $result;
}

$mysqli = new mysqli($MySQL_Host, $MySQL_Username, $MySQL_Password, $MySQL_Database, $MySQL_Port);

    MySqlQuery("INSERT INTO FlashVideoList ('title', 'urltitle', 'description', 'tags', 'category', 'filename', 'filetype', 'size', 'uploadedbyuser', 'uploadtime') " .
    "VALUES ('" . $mysqli->real_escape_string($_SESSION['Title']) . "','" . $mysqli->real_escape_string(GetUrlTitle()) . "','" . $mysqli->real_escape_string($_SESSION['Description']) . "','" .
    $mysqli->real_escape_string($_SESSION['Tags']) . "','" . $_SESSION['Category'] . "','" . $mysqli->real_escape_string($FlashFileName) . "','" . $mysqli->real_escape_string($_FILES["file"]["type"]) . "','" .
    $mysqli->real_escape_string($_FILES["file"]["size"]) . "','" . $mysqli->real_escape_string($UploadUserID) . "','" . time() . "');");

mysqli_free_result($result);
mysqli_close($mysqli);

Any help is appereciated, thanks
Select queries work fine with this same code

EDIT: Alright, i’ve made some progress, it seems that about everything possible is wrong with this code 😛 so yeah this is my query now:

INSERT INTO FlashVideoList (`title`, `urltitle`, `description`, `tags`, `category`, `filename`, `filetype`, `size`, `uploadedbyuser`, `uploadtime`) VALUES (`letitle`,`letitle`,``,`tagzz`,`FlashVideo`,`585336_pokemonsnewgrounds.swf`,`application/x-shockwave-flash`,`5058231`,`0`,`1339103842`); 

And if I run it directly through navicat i get the error:

[Err] 1054 - Unknown column 'letitle' in 'field list'

Anyone know what i’m doing wrong? :/

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T06:54:01+00:00Added an answer on June 5, 2026 at 6:54 am

    Read the error message. What error message? Well, that’s another issue, but it would have said why the insert failed1.

    One (but perhaps not the only) problem as mentioned in the comments is that ' is not a valid identifier quote and thus results in a parse error. In MySQL the default is `, but it can be changed (to ") if using ANSI quotes.

    INSERT INTO FlashVideoList (`title`, ...)
    

    1 Here is an example of basic error handling for mysqli (scroll to the bottom). The basic idea is, if the query returns FALSE then something failed and error can/should be consulted.

    Also, I’d recommend cleaning up the code and getting rid of the “proxy” function call.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
this is what i have right now Drawing an RSS feed into the php,
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have a French site that I want to parse, but am running into
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I'm trying to create an if statement in PHP that prevents a single post
I have some data like this: 1 2 3 4 5 9 2 6
I have just tried to save a simple *.rtf file with some websites and
For some reason, after submitting a string like this Jack’s Spindle from a text
I have this code to decode numeric html entities to the UTF8 equivalent character.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.