I have a code :
$id=implode(",",$selected);
$query = "SELECT u.id, p.brand, n.number FROM `user` u
LEFT OUTER JOIN `phone` p ON u.id = p.id LEFT OUTER JOIN `number` n
ON p.id = n.id WHERE u.id in ($id)";
Where $selected is an array array(1,2,3)
. But when i run it, it appears this notice :
Unknown column '1' in 'where clause'
How to handle this problem? Thank you