[Typo3-dev] change default sorting of MySQL WHERE - IN
Sacha Vorbeck
sachav at gmx.net
Thu Sep 1 20:21:50 CEST 2005
Hi,
when I select multiple records from tt_content using the following query:
SELECT uid
FROM tt_content
WHERE
uid in (3765,3764,34,88)
(additional enableFields checks go here)
which is the result of:
$addwhere= $GLOBALS['TSFE']->cObj->enableFields('tt_content');
$result=$GLOBALS['TYPO3_DB']->exec_SELECTquery('uids','tt_content',"uid
in ($content_list) ".$addwhere);
MySQL sorts the result with UID asc:
34,88,3764
But I need the uids in the original order:
3764,34,88
Any ideas on how I can achieve this?
--
thank you - all the best,
Sacha
More information about the TYPO3-dev
mailing list