Categories
SQL

PHP MySQL Query based on number of results returned

$sql = "SELECT * FROM tbl";
$result = mysql_query($sql);
if (mysql_num_rows($result)==0)
{
//do this
}
else
{
//do that
}
TFSA Labs — Compare, simulate and optimise your South African TFSA portfolio