ordering search results

2009-07-17 Thread PJ
Can't find anything on the web that deals with my problem(s). I have to display thousands of book listings by title, sub_title with 10 books per page. The php/mysql code works fine - except: ASC or DESC does not change one iota. I have checked by commandline and find that it is not working at all

RE: ordering search results

2009-07-17 Thread Gavin Towey
] Sent: Friday, July 17, 2009 8:07 AM To: MySql Subject: ordering search results Can't find anything on the web that deals with my problem(s). I have to display thousands of book listings by title, sub_title with 10 books per page. The php/mysql code works fine - except: ASC or DESC does not change

Re: ordering search results

2009-07-17 Thread PJ
Here's the query: SELECT * FROM book ORDER BY $sort $dir LIMIT $offset, $records_per_page; $sort == 'title, sub_title'; $dir==ASC (or DESC); $offset== (any multiple of 10); $records_per_page== 10; I could let the user change these, but I decided it is simpler to keep it at 10 books/page. Only the

Re: ordering search results

2009-07-17 Thread Darryle Steplight
You might have to change the collation you are currently using to one that best match the language of those weird accents you are referring too. That's part of the reason you may be getting unexpected results with your ORDER BY statement. Also, can you show us your select statements? On Fri, Jul

RE: ordering search results

2009-07-17 Thread Gavin Towey
: PJ [mailto:af.gour...@videotron.ca] Sent: Friday, July 17, 2009 1:25 PM To: Darryle Steplight Cc: MySql Subject: Re: ordering search results Here's the query: SELECT * FROM book ORDER BY $sort $dir LIMIT $offset, $records_per_page; $sort == 'title, sub_title'; $dir==ASC (or DESC); $offset== (any

RE: ordering search results

2009-07-17 Thread Gavin Towey
, 2009 1:25 PM To: Darryle Steplight Cc: MySql Subject: Re: ordering search results Here's the query: SELECT * FROM book ORDER BY $sort $dir LIMIT $offset, $records_per_page; $sort == 'title, sub_title'; $dir==ASC (or DESC); $offset== (any multiple of 10); $records_per_page== 10; I could let the user