Andrew Ballard wrote:
It won't be any of those because the query is successful even if it
returns no records. You could use
http://us2.php.net/manual/en/mysqli-stmt.num-rows.php to determine how
many rows were returned.
Andrew
Oh ok, thanks that makes sense. Thanks for the link also
--
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))
On Thu, Apr 23, 2009 at 2:12 PM, Adam Williams
wrote:
> Is there a way to determine if a mysql query returns an empty set? I am
> selecting 10 results at a time with a limit statement and need to know when
> i've ran out of rows. I've only got 2 rows in the database, so when I start
> with row 1
mysql_num_rows() maybe? if not I probably haven't understood your question.
On Thu, Apr 23, 2009 at 8:12 PM, Adam Williams wrote:
> Is there a way to determine if a mysql query returns an empty set? I am
> selecting 10 results at a time with a limit statement and need to know when
> i've ran out
Is there a way to determine if a mysql query returns an empty set? I am
selecting 10 results at a time with a limit statement and need to know
when i've ran out of rows. I've only got 2 rows in the database, so
when I start with row 10, it returns an empty set. I have the following
code:
/
5 matches
Mail list logo