Returning query results in predefined order

前端 未结 11 1041
温柔的废话
温柔的废话 2020-11-29 06:01

Is it possible to do a SELECT statement with a predetermined order, ie. selecting IDs 7,2,5,9 and 8 and returning them in that order, based on

11条回答
  •  天命终不由人
    2020-11-29 06:37

    You get answers fast around here, don't you…

    The reason I'm asking this is that it's the only way I can think of to avoid sorting a complex multidimensional array. I'm not saying it would be difficult to sort, but if there were a simpler way to do it with straight sql, then why not.

提交回复
热议问题