Re: Advanced ORDER BY

2001-09-21 Thread Steve Edberg
You _might_ also be able to do something like: SELECT * FROM news WHERE newstype='1' AND global='1' ORDER BY concat(if(depart='center', 'A', 'B'), SortNumber) ASC I don't have quite enough info here, but I'm going to assume that you want the records with depart='center' sorted f

Re: Advanced ORDER BY

2001-09-21 Thread Ilya Martynov
l> Hello, l> I'm trying to do a mysql select statement like this: l> SELECT * FROM news WHERE newstype = '1' AND global = '1' OR depart = l> 'center' ORDER BY SortNumber ASC l> But I would like the ORDER BY to list all records where depart = 'center' l> first and then all the rest of the depart

Advanced ORDER BY

2001-09-21 Thread larentium
Hello, I'm trying to do a mysql select statement like this: SELECT * FROM news WHERE newstype = '1' AND global = '1' OR depart = 'center' ORDER BY SortNumber ASC But I would like the ORDER BY to list all records where depart = 'center' first and then all the rest of the depart records in alphab