Jump to content

[SOLVED] Error in you sql syntax


chris_2001

Recommended Posts

Could not run query: 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 'character WHERE name = 'Chris" at line 1

 

Im getting this error with this code. I think the problem is... 'Chris"  (part in bold), but I can't fix it. Code below where error occures.

 

$result = mysql_query("SELECT guid FROM character WHERE name = '".$user."'");

 

thanks in advance.

Link to comment
https://forums.phpfreaks.com/topic/79089-solved-error-in-you-sql-syntax/
Share on other sites

Read my post above.

 

Doesnt work, now gives the error:

 

Could not run query: 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 "character' WHERE name = 'Chris" at line 1

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.