error77
asked on
php sql query (if no results)
Hi all,
I have this code:
$SQL = "SELECT * FROM mytable where user_id='$userid'";
$result = mysql_query($SQL);
How can I tell it...
If (there are no results) {
// do this
} else {
// do something else
}
thanks
I have this code:
$SQL = "SELECT * FROM mytable where user_id='$userid'";
$result = mysql_query($SQL);
How can I tell it...
If (there are no results) {
// do this
} else {
// do something else
}
thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.