That's not quite right,
if (!$result = mysql_query($sql, $db))
{ echo "Query failed";
} else
{ if (!$row = mysql_fetch_row($result))
{ echo "No records found.";
}
}
Tim Ward
Internet Chess www.chessish.com <http://www.chessish.com>
----------
From: Erik Price [SMTP:[EMAIL PROTECTED]]
Sent: 10 April 2002 15:00
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Re: mysql
...
Someone did suggest that you use an if statement, however, in the
event
that no records are retrieved --
if (!$result = mysql_query($sql, $db)) {
echo "No records found.";
} else {
$row = mysql_fetch_row($result);
}
Erik
----
Erik Price
Web Developer Temp
Media Lab, H.H. Brown
[EMAIL PROTECTED]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php