Jump to content

[SOLVED] if empty show message


anthony-needs-you

Recommended Posts

How would i incorporate this:

 

$numrows = mysql_num_rows($result); 

if($numrows == 0){ 
echo "No entries"; 
} 
else{ 

 

into this:

 

$query = "SELECT id, destination, airport, resort, hotel, board, duration, departureDate, expireDate, price, description, stars,  customerRef FROM test WHERE expireDate > CURDATE() ORDER BY $type LIMIT $startrow, 10";
$result = mysql_query($query) or die('Error : ' . mysql_error());

while(list($id, $destination, $airport, $resort, $hotel, $board, $duration, $departureDate, $expireDate, $price, $description, $stars,  $customerRef) = mysql_fetch_array($result, MYSQL_NUM))
{

 

Many thanks for your help

Link to comment
https://forums.phpfreaks.com/topic/137808-solved-if-empty-show-message/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.