Error With MAX() in MySQL
Today i was trying to get the maximum value of a column in mysql.In mysql “select max(column_name) from table_name ;” works fine.But i was facing problem to get the value by mysql_query() in php.My code was
$re = mysql_query(“Select max(id) from test”);
It shows wrong output.
I just change it to
$sql=”select max(id) from test;”;
And its work fine 🙂