Re: another pagination problem
| From: | PJ | Date: | Fri, 17 Jul 2009 15:55:19 +0000 |
| Subject: | Re: another pagination problem | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-295529@lists.php.net to get a copy of this message | ||
Ashley Sheridan wrote:
> 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@ptahhotep.com
>> 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.
>
>
Sorry, forgot: another problem is the Thes - how do you exclude them
from the ordering.
Also: one output with just title for field returned a series of The
Art.., The Birds..., The Birth...etc. in ASC; whereas DESC returned:
Boats, Black Cumin, Birds of..., Biological..., Bioarchaeology..,
Avaris... etc.
--
Hervé Kempf: "Pour sauver la planète, sortez du capitalisme."
-------------------------------------------------------------
Phil Jourdan --- pj@ptahhotep.com
http://www.ptahhotep.com
http://www.chiccantine.com/andypantry.php