I have an array that will be variable, eg $ ref = array ('123', '654', '555').
I wanted to do a SQL query to bring information from these references, something like:
SELECT *
FROM tabela_itens
WHERE ref = (array do PHP)
How can I do this?
The simple query I make, without array, looks like this:
$query = ("
SELECT *
FROM tabela_itens
WHERE ref = '123'
");
$db -> setQuery($query);
$results = $db -> loadObjectList();
foreach($results as $row){
echo '<div>'.$row->ref.'</div>';
};