$st=$object->prepare("delete * from banners where bannerid IN (?)");
$st->bindParam(1, $ids);
You're trying to bind a single parameter to an array of values. You need to pass in each value as a separate parameter; for example:
$st=$object->prepare("delete * from banners where bannerid IN (?,?,?)");
You need to include a placeholder for each value you want to include in your IN clause. You can generate the SQL dynamically, based on how many items are in $ids
.
I missed the 'DELETE *', which is invalid syntax; but I'm leaving this in place because the point I did notice is valid. This is an incomplete answer, not a wrong one.