?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.
An easy way, is to use PHP for this. For example.
$Result=MySQL_Query("SELECT * FROM $table where description LIKE
'%$keyword%");
if(MySQL_Num_Rows($Result)==0){
echo("No Records Found!");
}else{
//Your formating of results here.
}
Hope this helps!
Daniel
---------------------------------------------------------------------
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