$l="SELECT * FROM $tbl_name WHERE (OrderID = '" . mysql_real_escape_string($_POST['or']) . "')";
$sql = mysql_query($l) or die(mysql_error());
Here OrderID is my table column.
I am having two columns. Name is the first column and OrderID is the secondone. Both are same datatype i used as varchar.
When I apply the above code for first column alone is not working. but when i use the same code for second column its working.
I mean if i use name column its showing error as
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 'name = 'xx')' at line 1
and
when i use OrderId column its working fine. I dont know why......??????
Please clear my error