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!)


Martin C.

LDL Enterprise wrote:

> How can I output "no records found" when there is no record found? This is
> the query I am using.
>
> SELECT * FROM $table where description LIKE '%$keyword%'
>
> Is there a sql statment that will return a string if no record exists?
> Thanks in advance.
>
>  _     __    _
> | |   |   \ | |
> | |__ | |> || |__
> |____||___/ |____|
>
> Larry L.
> [EMAIL PROTECTED]
> www.ldlenterprise.com
>
> ---------------------------------------------------------------------
> 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


---------------------------------------------------------------------
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

Reply via email to