I am currently creating an array of identifiers and requesting this array using implode as follows:
$sql = "SELECT * FROM item_bank_tb WHERE item_id IN(" . implode(',', $ids) . ")";
the $ids array is constructed so that the identifiers are in a specific order. However, the results of this query are not in that order. I assume that they are all in the same query, the results are displayed in the order in which they were located (ascending).
Is there any way around this? (except for including a field that I can ORDER BY)
thank you very much.
source share