Jump to content

[SOLVED] SQL Syntax Error?


refiking

Recommended Posts

Here is what the script returned:

 

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 'testuser'' at line 1

 

Here is the line they are referring to:

 

mysql_query("UPDATE dpicks SET first = '$num1' WHERE user = '$user'")or die(mysql_error());

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

`backticks` might help if any of the variable names used had been MySQL reserved words, but as they're not backticks would be pointless.

 

For reference purposes - http://dev.mysql.com/doc/refman/4.1/en/reserved-words.html

 

@refiking - are you sure that error report refers to the line you quote?

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.