4 Replies Latest reply on Jan 5, 2011 1:55 AM by हिमाँशु

    sqlite order by

    Starlover_jacob Level 1


      when using sqlite with air I came to the following question;

      Is there a way to get the selected order as result?


      In mysql you do something like this:

      SELECT * FROM mytable WHERE id IN (11, 2, 5) ORDER BY FIELD(id, 11, 2, 5);


      But air gives me an error on the FIELD option.


      The following option doesn't work either;

      SELECT * FROM mytable WHERE id IN (11,2,5) ORDER BY FIND_IN_SET(id, '11,2,5')


      Is there another way to order by a given order?

      Please some help.


      Greets, J.