On Saturday 06 April 2002 16:57, Hawk wrote:
> This is just speculations, but I thought I'd as well ask now before I get
> to work
> Lets say I have a news page, and I only want the last ten posts to show on
> it, then I ORDER BY id ASC LIMIT 10 right?
> but how do I add the next page?
> count rows from the database and see if its more than 10 lines, and then ?
> saw something about a MAX and a MIN mysql command, but how do I use it? and
> should I use it for that purpose? :)
> like... ORDER BY id ASC LIMIT 10 MIN(10) MAX(20) or something?
> I dont know really.. just speculations as I said :)
Rather than indulging in idle speculation, consult the mysql manual :)
For the first 10:
... ORDER BY id ASC LIMIT 0, 10
For the next 10:
... ORDER BY id ASC LIMIT 10, 10
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
Nothing is so firmly believed as that which we least know.
-- Michel de Montaigne
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php