By: donatello
Date: 2007-02-20
Time: 15:12
|
sort on many fieldsHi, i am trying to sort data by field with tbs, using sql query.
This works: SELECT * FROM myTable ORDER BY item1 DESC But this doesn't: SELECT * FROM myTable ORDER BY item1 DESC, item2 ASC, item3 DESC In the second query, the data is sorted on item1,but not items 2 and 3. Is there a mistake in the query or tdbs doesn't support it? My tbs version is 2.05.1 Cheers. |
|
By: Bob
Date: 2007-02-20
Time: 15:27
|
Re: sort on many fieldsHi,
This has nothing to do with TBS. TBS just gives the SQL statement to MYSQL as is (except for sub-blocks). Try your query in PhpMyAdmin to see the result. TBS should display the same. |
|
By: TomH
Date: 2007-02-20
Time: 15:33
|
Re: sort on many fieldsTry a simple (non-TBS) php script to see what's going on.
If you're using MySQL try the "explain" query
|
|
By: donatello
Date: 2007-02-20
Time: 15:48
|
Re: sort on many fieldsyou were right, same result in phpmyadmin...i don't understand, cause there's no error! the query is executed, but not correctly.
|
|
By: sheepy
Date: 2007-02-22
Time: 12:14
|
Re: sort on many fieldsMake sure MySQL is up to date. Check that the collation is correct (very important). Try a query without order by to verify that the data is correct. If problem persists, consult Google.
http://www.searchmash.com/search/mysql+sort+incorrectly |