Re: another pagination problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Friday 17 July 2009 16:35:10 PJ wrote:
> I noticed the thread on pagination here just after posting to mysql. But
> I am using php/mysql.... ;-)
> I have some rather complicated ordering problems:
> 1. need to order by 2 fields title, sub_title
> 2. need to display 10 items per page (hundreds, if not 1000s or pages)
> 3. order by ASC or DESC makes not difference when ordering by 2 fields
> 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? )
> 5. those funny little dingles over foreign language characters refuse to
> follow our normal ordering rules; how do we do this?
> 6. The pagination and ordering syntax is correct & working with no
> errors; I've double checked on commandline.
> 7. At worst, I'll have to leave it at ASC and let visitors p&m; don't
> see a simple solution.
>
> Or am I wrong?
>
>
> --
> Hervé Kempf: "Pour sauver la planète, sortez du capitalisme."
> -------------------------------------------------------------
> Phil Jourdan --- pj@xxxxxxxxxxxxx
>    http://www.ptahhotep.com
>    http://www.chiccantine.com/andypantry.php

How are you attempting to order the query, do you have an excerpt? I've never 
had any problems ordering my results based on more than one field, where the 
orders are based on a mixture of ASC and DESC fields. The ordering part looks 
something like this:

ORDER BY `field1` DESC, `field2` ASC, `field3` DESC

and that works just fine for me. Also, what character set are you using on 
that table, as that may have a difference on how the ordering works.

-- 
Thanks,
Ash
http://www.ashleysheridan.co.uk

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux