I get data from IN query in this format
SELECT * FROM wp_devices WHERE QID=’1′ and DId IN(36,71,37,39,38)
But they are displaying in this format DId IN(36,37,38,39,71) instead of DId IN(36,71,37,39,38).
What should I do ?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You should add order by clause to your query.
Because your order is a little bizarre you must to write case workflow code:
I suppose that you work with mysql because you have another question that is tagged like this. Then you can simplify previous query using field function:
Notice that field works with strings an an implicit type casting is maded.