I have this Select:
SELECT pts_name
FROM products_tecspecs
WHERE pts_id IN ( 5275, 21, 5276, 5277,
5278, 49, 5279 )
ORDER BY FIELD (pts_id, 5275, 21, 5276, 5277, 5278, 49, 5279)
I am trying to get the result and order it the way I want. I found this answer but got this error: #1305 – FUNCTION database_name.FIELD does not exist
I am trying to get specifics results with IN (that’s working), but sorting the way I want.
Help you be apreciated.
Remove the space between the function and the parenthesis:
FIELD (MySQL parser does not like spaces there. Use: