Hey all,
I'm confused as to wheter I should save the following error message for later display or is this error only for sql syntax?
$query = "SELECT *
from $table
WHERE $column = '".mysql_real_escape_string($value)."'";
if( !( $res = mysql_query( $query ) ) ){
$error[2] = mysql_error();
return false;
I store the mysql_error returned value into an array called error. If my function returns false then the error message stored in the array is displayed. But I wonder if it's really useful.
I know that if my SQL syntax is wrong then it will return it but other than that, what are the possible return messages?