anthony-needs-you Posted December 20, 2008 Share Posted December 20, 2008 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 More sharing options...
ILMV Posted December 20, 2008 Share Posted December 20, 2008 if(mysql_num_rows($result)==0) { echo("No Rows"); } Link to comment https://forums.phpfreaks.com/topic/137808-solved-if-empty-show-message/#findComment-720264 Share on other sites More sharing options...
ILMV Posted December 20, 2008 Share Posted December 20, 2008 You need to put that after your $result=mysql_query();, so the while statement is inside the if statement... Link to comment https://forums.phpfreaks.com/topic/137808-solved-if-empty-show-message/#findComment-720265 Share on other sites More sharing options...
anthony-needs-you Posted December 20, 2008 Author Share Posted December 20, 2008 thanks alot! Best wishes Link to comment https://forums.phpfreaks.com/topic/137808-solved-if-empty-show-message/#findComment-720266 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.