$record_id1=$_REQUEST['record_id'];
echo $record_id1;
echo $dor1;
if(isset($_REQUEST['updatebtn']))
{
$status=$_REQUEST['up'];
$sql="UPDATE record SET dor='$dor1' WHERE record_id=$record_id1";
mysql_query($sql) or die(mysql_error());
}
I am trying to update my record
table which will take record_id1 in its WHERE
clause and will simply update dor=$dor
here dor
is properly set in the page .The problem is when i try to execute this page i get the following error :
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax...
i have spent hours and was not able to point out the bug when i use ... WHERE record_id=7(any numeric value)
the table gets updated but when i am updating it with $record_id1
i am getting the above error.
Data Type
dor =String
record_id=int