IN Clause in SQL Query -


i had 1 sql query:

select name category_language   category_id in (11, 22) , language_id=1 

in query:

11 -> aa

22 -> bb

i want records returned this:

aa

bb

while running query returns:

bb

aa

kindly, let me know further elaborate question.

here new:

select name category_language       category_id in (11, 22)     , language_id=1 order     field(category_id, 11, 22) 

this catered mysql. make sure ids in same order in field() function in in() function.


Comments

Popular posts from this blog

Cursor error with postgresql, pgpool and php -

delphi - ESC/P programming! -

c++ - error: use of deleted function -