$prepare=$text->prepare("
select *
from (
select text1,text2
from test1
union
select text1,text2
from test2
) as u
where u.text1 in (?,?)");
$prepare->execute($array);
$fetch=$prepare->fetch(PDO::FETCH_ASSOC);
print_r($fetch);
I have a PDO statement that uses UNION, WHERE and IN all in one. This should be returning a few results. The array contains all datapoints. What might be the issue in the statement?