I have a search that checks my database for items that i may have. What I would like for my search to do is that when it doesnt find anything that it will display a message telling the user that. right now it just displays a blank. I can post the code if it will be needed.
Hi fr8, You could use:
if(mysql_numrows($result)<=0){ echo "Nothing Found"; } else { Echo "I Got Stuff to Show You !"; }
Regards Steve
steve8557 has the right idea, though of course you'll have to use different code if you're not using mysql.
btw, it is mysql_num_rows() mysql_numrows() is deprecated.
Wuha. That worked perfectly. I had an ifelse statment that i was using to try and get it but i was not getting the desired effect. this mysql_num_rows is what i needed. thanks again.