Re: another pagination problem
| From: | LinuxManMikeC | Date: | Sat, 18 Jul 2009 11:41:53 +0000 |
| Subject: | Re: another pagination problem | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-295542@lists.php.net to get a copy of this message | ||
On Fri, Jul 17, 2009 at 9:35 AM, PJ<af.gourmet@videotron.ca> wrote:
> 4. when ordering by title, results are totally different for ASC & DESC;
> not the same data at all (Is the ordering done on the entire db? )
Yes, sort of. ORDER BY is applied to the results of the entire query.
Then LIMIT takes a slice out of the results (paginate). My guess,
the "problem" you are experiencing is you are viewing page 2 of 5 of
your output in ASC order, then switch over to DESC without adjusting
the page number. What you are seeing (roughly) for page 2 of 5 in
DESC order is what used to be on page 4 of 5 in ASC order, only
"upside-down". :-)