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==

RE: ordering search results

2009-07-17 Thread Gavin Towey
From: 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'

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 1

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 Gavin Towey
From your description of your problem, it's very difficult to understand what you're doing and what results you're trying to get. Making some assumtions, I think you might need to use a technique described in this link to get the results you want: http://jan.kneschke.de/projects/mysql/groupwise