empty sql query php 6

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
yebaws
Forum Newbie
Posts: 1
Joined: Wed Mar 17, 2010 12:53 pm

empty sql query php 6

Post by yebaws »

if (empty($id)) {echo "No result"

used to work fine. But no longer with php6 as "results with no value are not empty"

What alternative could I use?

Thanks...
User avatar
flying_circus
Forum Regular
Posts: 732
Joined: Wed Mar 05, 2008 10:23 pm
Location: Sunriver, OR

Re: empty sql query php 6

Post by flying_circus »

check the num_rows of the result set?
Post Reply