Jump to content

pick apart my query mistake


mike12255
Go to solution Solved by mac_gyver,

Recommended Posts

Its time for bed but I have to finish this file before I go to bed and I cant figure out the mistake with my query hoping there are some fresh eyes out there that can see it.

 

Here is the line :

$query = $qls->Security->make_safe("INSERT INTO `{$qls->config['sql_prefix']}chat` (username, message) VALUES (\"$user\", \"$message\")");

when I die the statement I get:

 

 

 

INSERT INTO `qls3_chat` (username, message) VALUES ("mike12255", "TESTING FJFDHSJHDFISEJ")

 

I can take that and query that in through php my admin no problem but when i run a query through php code I get the error:

 

 

 

1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '"mike12255", "TESTING FJFDHSJHDFISEJ")' at line 1

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.