Re: Database Function
| From: | Hugh Bothwell | Date: | Sun, 02 Sep 2001 13:32:28 +0000 |
| Subject: | Re: Database Function | ||
| References: | 1 | Groups: | php.db php.general |
| Request: | Send a blank email to php-db+get-12097@lists.php.net to get a copy of this message | ||
"Georgie" <georgiecasey@e-merge.ie> wrote in message
news:20010902154429.59652.qmail@pb1.pair.com...
> I have a simple php script that searchs a MySQL database and returns
results
> that I made myself and I'm trying to implement code that splits the
results
> into x amount of pages, buts it really tricky.
... if you want X results per page, look at the LIMIT clause for your
SQL statements.
If you actually meant X _pages_ (... I don't see where this would be
useful, but hey...) I would check the number of returned results
with mysql_num_rows(), calculate the start-row offset, and then
mysql_data_seek() to the place you want.
Either way, it's actually pretty simple.