This question already has an answer here:
Is it possible to use this command in SQL?
$q1 = $sql->query("
SELECT base_item
FROM items
WHERE id = **199415179;199444567;199459162;199397746;199397747;**
")->fetch_object()->base_item;
The IDS who are BOLD are diffrent id's, and my problem is, that this id's are pasted in one SQL table...
thanks a lot for your answers...
</div>
You can use IN
. Some example code:
$q1 = $sql->query("SELECT base_item FROM items WHERE id IN (".str_replace(';',',', '199415179;199444567;199459162;199397746;199397747').") ")->fetch_object()->base_item;
You could use the IN function and comma seperate them:
SELECT base_item FROM items WHERE id IN(199415179,199444567,199459162,199397746,199397747)