I would like to print something like:
'Sorry there is currently no audio of that description in our database' if there are no results found.
I am using the following code to display my results:
<?
$username="username";
$password="password";
$database="database";
mysql_connect(localhost,$username,$password);
@mysql_select_db($database) or die( "Unable to select database");
$query="SELECT * FROM audio WHERE name='$keyword'";
$result=mysql_query($query);
$num=mysql_numrows($result);
mysql_close();
$i=0;
while ($i < $num) {
$html=mysql_result($result,$i,"html");
echo "$html<br>";
++$i;
}
?>
Any help would be greatly appreciated.
Thanks
Steve.