ok quick mysql question i have a select statement for a mysql table and i want to put an error msg if no record is found. How can i do this?
thanks 🙂
You probably want to look into something like [man]mysql_num_rows[/man]
$qry = mysql_query("SELECT * FROM table"); if(mysql_num_rows($qry) == 0){ echo "Error Message"; } else { //Do something else }
yep that works well, thanks for your help 🙂
You're welcome. Be sure to mark the thread resolved using the "Mark Thread Resolved" link below. Have a nice night.