$stmt = $db->prepare('INSERT INTO ids VALUES (0, :url)');
try {
$db->beginTransaction();
foreach ($ursl as $url) {
$stmt->bindValue(':url', $url);
$stmt->execute();
}
$db->commit();
} catch (PDOException $e) {
$db->rollBack();
}