This must be one of the most basic requirements but if I do what the books say it causes problems!
If a query on a MySQL datbase returns no records I want to put a message that tells the visitor we found nothing.
I've tried several ways that reference books say, but the only one that works has an undesireable side effect!!
If I use
if (!($row = mysql_fetch_row($ResultID)))
or
if (!$ResultID || !($row = mysql_fetch_row($ResultID)))
or similar to identify no records and there aren't any, it will test true and print out my message.
However, when there are records, the inclusion of this 'if' test causes the first record returned to be discarded.
How do I get round this??
TIA
3v