michaelkirby Posted April 26, 2010 Share Posted April 26, 2010 Hi all, I have a table which is populated upon a query. What I need to do is to be able to display a message saying 'No records returned' when the query doesn't return any rows. Can any one help me out how to do this? Quote Link to comment https://forums.phpfreaks.com/topic/199840-adding-an-error-message-if-no-data-is-returned-in-table/ Share on other sites More sharing options...
laPistola Posted April 26, 2010 Share Posted April 26, 2010 if (mysql_num_rows($query) < 1) { echo "No records returned"; } Quote Link to comment https://forums.phpfreaks.com/topic/199840-adding-an-error-message-if-no-data-is-returned-in-table/#findComment-1048949 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.