<?php
$sth = $dbh->query('INSERT INTO songs (title,artist) VALUES (?,?)',
array($title, $artist));
?>
<?php
$title = $dbh->quote($title);
$title = strtr($title, array('_' => '\_', '%' => '\%'));
$sth = $dbh->query("DELETE FROM songs WHERE title LIKE $title");
?>