Re: how to determine if a mysql query returns an empty set?

From: Date: Thu, 23 Apr 2009 18:24:07 +0000
Subject: Re: how to determine if a mysql query returns an empty set?
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-291893@lists.php.net to get a copy of this message
Nitsan Bin-Nun wrote:
mysql_num_rows() maybe? if not I probably haven't understood your question. Thanks, I never thought of trying that. This code works!
       $mysqli_get_requests = mysqli_query($mysqli,$get_requests);
               if (!mysqli_num_rows($mysqli_get_requests))
                       {
                       echo "You have reached the end of the results.
                       Please press the back button.
                       <form action=/helpdesk/login.php method=post><input
                       type=submit value=Back
                       name=submit></form></body></html>";
                       exit;
                       }


« previous php.general (#291893) next »