Please can someone help me debug this code. I keep on getting this error message
{Warning: Supplied argument is not a valid MySQL result resource in /usr/www/htdocs/viewaccount.php on line 19
No Records Found !}
<?
require_once("bookmark_fns.php");
session_start();
do_html_header("Account details");
check_valid_user();
{
if (!($conn = db_connect()))
return false;
if ($sortby!="")
{
$sorted = " order by $sortby ";
}
$bareQuery = "SELECT * FROM accountinfo WHERE username='$valid_user'";
$queryall = $bareQuery.$sorted;
$resultall = MYSQL_QUERY($queryall);
$number = mysql_Num_rows($resultall); // the error is being generated here is line 19
if ($number==0) {
echo "No Records Found !";
}
else if ($number>0) {
$x=0;
};
?>