All, If I run a query like the following:
$qry = "Select wrong_column from table_name";
$result = mysql_query($qry);
If wrong_column doesn't exist then I'll get a mySQL error. In PHP, how can I determine if there was an error from mySQL? If there was an error I'd like it to stop further processing but if there wasn't an error I'd like to get the mySQL results like this:
$resultset = mysql_fetch_array($result);
Would doing something like this work?
if(!mysql_error()){
$resultset = mysql_fetch_array($result);
}
Any advice on how to do this would be appreciated. Thanks in advance!