Mysql + php error
Posted: Thu May 29, 2008 4:24 am
I got following 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 '' at line 1
$latestid = "SELECT id,fr_id,max(frd_date) FROM emp WHERE user_id ='$uid' and status='0' GROUP BY id DESC Limit 1";
$latestresult = mysql_query($latestid) or die(mysql_error());
$num1 = mysql_fetch_array($latestresult);
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 '' at line 1
$latestid = "SELECT id,fr_id,max(frd_date) FROM emp WHERE user_id ='$uid' and status='0' GROUP BY id DESC Limit 1";
$latestresult = mysql_query($latestid) or die(mysql_error());
$num1 = mysql_fetch_array($latestresult);