Boofo
01-02-2003, 09:20 AM
I got this db error earlier tonight and was wondering if someone could please tell me what it means?
Database error in vBulletin 2.2.9:
Invalid SQL: UPDATE user SET signature='\"Everybody wants to go to heaven, but nobody wants to die.\"
~Boofo\'s Babe~ ' WHERE userid=
mysql error: You have an error in your SQL syntax near '' at line 1
mysql error number: 1064
Date: Thursday 02nd of January 2003 10:33:48 AM
Script: http://www.bearfacts2.com/forum/forum/sedit.php
Referer: http://www.bearfacts2.com/forum/sedit.php
The file in question is a signature editing file. Here is the code I thought was causing it:
if ($action=="SaveChanges") {
$newsignature=censortext($signatureform);
$DB_site->query("UPDATE user SET signature='".addslashes($newsignature)."' WHERE userid=$bbuserid");
and here is what I changed it to:
if ($action=="SaveChanges") {
$newsignature=censortext($signatureform);
$DB_site->query("UPDATE user SET signature='".addslashes($newsignature)."' WHERE userid='$bbuserinfo[userid]'");
The reason I changed "userid=$bbuserid" to "userid='$bbuserinfo[userid]'" was because in 2 other places in the same file on db queries they were using "userid='$bbuserinfo[userid]'" and not just userid=$bbuserid. Would that make a difference?
Database error in vBulletin 2.2.9:
Invalid SQL: UPDATE user SET signature='\"Everybody wants to go to heaven, but nobody wants to die.\"
~Boofo\'s Babe~ ' WHERE userid=
mysql error: You have an error in your SQL syntax near '' at line 1
mysql error number: 1064
Date: Thursday 02nd of January 2003 10:33:48 AM
Script: http://www.bearfacts2.com/forum/forum/sedit.php
Referer: http://www.bearfacts2.com/forum/sedit.php
The file in question is a signature editing file. Here is the code I thought was causing it:
if ($action=="SaveChanges") {
$newsignature=censortext($signatureform);
$DB_site->query("UPDATE user SET signature='".addslashes($newsignature)."' WHERE userid=$bbuserid");
and here is what I changed it to:
if ($action=="SaveChanges") {
$newsignature=censortext($signatureform);
$DB_site->query("UPDATE user SET signature='".addslashes($newsignature)."' WHERE userid='$bbuserinfo[userid]'");
The reason I changed "userid=$bbuserid" to "userid='$bbuserinfo[userid]'" was because in 2 other places in the same file on db queries they were using "userid='$bbuserinfo[userid]'" and not just userid=$bbuserid. Would that make a difference?