You can use mysql_result_rows() to check whether any rows were returned;
something like:
you mean:
mysql_num_rows();
?
Chris
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Yes, sorry about that. :P I need to eat lunch now.
-Andy
-Original Message-
From: Chris Boget
Subject: Re: [PHP-DB] RE: Search results
you mean:
mysql_num_rows();
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
hi
...and to be able to know the exact number of pages
do
$result = mysql_query(select count(*));
$nb_pages = $result/$nb_records_per_page;
et voila! add this to marcus's suggestion and you have a full paging script,
if you want some inspiration check out http://phpclasses.upperdesign.com i