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
Post a Comment