mdattani Posted March 10, 2007 Share Posted March 10, 2007 Hello everyone, I have a search facility on my homepage for a property lettings website. There are 3 search parametres, location, rent and type (e.g. 1bed). It passes the parametres to the results.php page and displays the results in a table. When there are no results, it still displays a table, but it is empty. How do I display some text that says "No Results" instead of an empty table?? Thanks guys Link to comment https://forums.phpfreaks.com/topic/42159-how-to-display-no-results-instead-of-empty-table-on-results-page/ Share on other sites More sharing options...
papaface Posted March 10, 2007 Share Posted March 10, 2007 If you are using mysql use mysql_num_rows if (mysql_num_rows($query) == 0) { echo "No Results"; } Link to comment https://forums.phpfreaks.com/topic/42159-how-to-display-no-results-instead-of-empty-table-on-results-page/#findComment-204517 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.