0

i have a little syntax problem in php mysql, and i cant figure it out, hoping that u guys can help me out....mysql error and code are below

Error:
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 '='4', Room='3', ab='1', ' at line 1

note: realescpaestring -- do stripslash function and $_session is a variable
and be carefull between single quote and double quote(actually its nt cleared here thats why im telling) "--> is double quote and '--> is single quote

code:

$table1="xyz";
$query1 = 'UPDATE '.$table1. "SET
Building= ' ". $this->realescapestring($_GET) . " ',
Room= ' ". $this->realescapestring($_GET) . " ',
ab= ' ". $this->realescapestring($_GET) ." ',
Hospite= ' " . $this->realescapestring($_GET) . " ',
Tolet=' " . $this->realescapestring($_GET) . " ',
ground=' " . $this->realescapestring($_GET) . " ',
No1=' " . $this->realescapestring($_GET) . " ',
Policy=' " . $this->realescapestring($_GET) . " ',
Class=' " . $this->realescapestring($_GET) . " ',
trail=' " . $this->realescapestring($_GET) . " ',
Magnet=' " . $this->realescapestring($_GET) . " ',
Procedure=' " . $this->realescapestring($_GET) . " ',
Experience=' " . $this->realescapestring($_GET) . " ',
System= ' " . $this->realescapestring($_GET) . " ',
Qua=' " . $this->realescapestring($_GET) . " ',
Internet=' " . $this->realescapestring($_GET) . " ',
Water-Supply=' " . $this->realescapestring($_GET) . " ',
Electricity=' " . $this->realescapestring($_GET) . " ',
Food=' " . $this->realescapestring($_GET) . " ',
Cleanness=' " . $this->realescapestring($_GET) . " ',
Medical= ' " . $this->realescapestring($_GET) . " '
WHERE EMAIL=' ".$_SESSION." ' ";

2
Contributors
1
Reply
2
Views
6 Years
Discussion Span
Last Post by pritaeas
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.