Jump to content

[SOLVED] SQL Syntax - Can't Find The Error


refiking

Recommended Posts

Here's the Error Message:

 

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 '= Home WHERE sid = '15'' at line 1

 

$update2 = mysql_query("UPDATE history SET" .$ptid. "= '$title' WHERE sid = '$sid'")or die(mysql_error());

 

I checked each variable and they all passed with no problem and here is the other query that passed with no problem.  To me, they are identical in regard to structure.

 

$update = mysql_query("UPDATE history SET " .$pid. "= '$text' WHERE sid = '$sid'")or die(mysql_error());

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

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.