Hi!
----- Original Message -----
From: "Martin Cloutier" <[EMAIL PROTECTED]>
To: "LDL Enterprise" <[EMAIL PROTECTED]>
Cc: "*MySQL mail list" <[EMAIL PROTECTED]>
Sent: Wednesday, February 14, 2001 8:58 AM
Subject: Re: mysql/php
> Try this:
>
> $RESULT_SET = mysql_query("SELECT * FROM $table where description LIKE
> '%$keyword%'");
>
> if(!$RESULT_SET){
> $RESULTS = "No records found";
> } else {
>
> do whatever needs to get done!
> }
>
> ...or something similar... (although I did not try it!)
>
I have found this doesn't work. If $RESULT_SET is null or
equal to nothing, that means that there was a problem
with the query.
You have to use mysql_num_rows($RESULT_SET)
to find out if 0 rows were returned.
Anna
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php