Reply to Re: Getting back set order from the IN param

Your name:

Reply:


Posted by Martin Larsen on 11/11/06 19:39

Yobbo wrote:

> I don't want this bloody order I want 6,20,234,19,32,4,800,177!!
>

Funny --- I came here right now to ask exactly that question! Although I
didn't find a answer, I somehow got inspired. Strange ...

Here is the solution:

SELECT STRINGTEXT, TOKENID
FROM WEBSTRINGS
WHERE TOKENID IN (6,20,234,19,32,4,800,177)
ORDER BY FIELD(TOKENID, 6,20,234,19,32,4,800,177)

You have to repeat the set but that's easily done in PHP.

Best regards,
Martin

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация