[thelist] Reordering result set (PHP/MySQL)
Robert Douglas
robert.douglas at rightmove.co.uk
Tue Feb 5 02:53:18 CST 2008
A wee note for others: The syntax Rudy sent through is perfect - don't
try and 'clean it up' as I did. There is *no space* between the word
'field' and the opening bracket. For example...
Won't work (note the space after 'field'):
select * from tracks
where id in (3,7,2,1)
order by field (id,3,7,2,1)
Will work:
select * from tracks
where id in (3,7,2,1)
order by field(id,3,7,2,1)
-----Original Message-----
From: thelist-bounces at lists.evolt.org
[mailto:thelist-bounces at lists.evolt.org] On Behalf Of Robert Douglas
Sent: 05 February 2008 05:52
To: thelist at lists.evolt.org
Subject: Re: [thelist] Reordering result set (PHP/MySQL)
Could it really be that simple? Thanks Rudy and Josh.
Much appreciated,
Rob.
-----Original Message-----
From: thelist-bounces at lists.evolt.org
[mailto:thelist-bounces at lists.evolt.org] On Behalf Of r937
Sent: 04 February 2008 15:08
To: thelist at lists.evolt.org
Subject: [thelist] Reordering result set (PHP/MySQL)
a rough ride? pffft, it is to snap ze fingers
select * from tracks
where id in (3,7,2,1)
order by field(id,3,7,2,1)
;o)
rudy
http://r937.com/
--
* * Please support the community that supports you. * *
http://evolt.org/help_support_evolt/
For unsubscribe and other options, including the Tip Harvester
and archives of thelist go to: http://lists.evolt.org
Workers of the Web, evolt !
________________________________________________________________________
This email has been scanned for all viruses by the MessageLabs service.
________________________________________________________________________
This email has been scanned for all viruses by the MessageLabs service.
________________________________________________________________________
--
* * Please support the community that supports you. * *
http://evolt.org/help_support_evolt/
For unsubscribe and other options, including the Tip Harvester
and archives of thelist go to: http://lists.evolt.org
Workers of the Web, evolt !
________________________________________________________________________
This email has been scanned for all viruses by the MessageLabs service.
________________________________________________________________________
This email has been scanned for all viruses by the MessageLabs service.
________________________________________________________________________
More information about the thelist
mailing list