$sql = "select * from tabelle where ID in ( " . (join ", ", @array) . ");";