I have a simple query pulling from the database based on a simple CSV
This is a rough example of what I'm doing:
$ids = '1, 2, 3';
$stmt = $mysqli->prepare("SELECT `id`, `name` FROM `table` WHERE `id` IN (?)");
$stmt->bind_param('s', $ids);
$stmt->execute();
$stmt->bind_result($id, $name);
while ($stmt->fetch())
{
echo $id.': '.$name."\n";
}
For some reason only id:1 is being returned. Will the bind_param('s', ) be affecting the formatting and causing this problem or am i doing something stupid?
Thanks in advance