in reply to Issuing a DELETE statement with DBI
$db->delete('music', { title => param('title') });
A really nice thing about SQL::Abstract and, thus, DBIx::Simple is that it takes care of the special case where the value is undef, for a field value of NULL, too. Just using placeholders wouldn't do, as the SQL query
won't ever delete anything.DELETE FROM music WHERE title = NULL
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Issuing a DELETE statement with DBI
by Corion (Patriarch) on Sep 01, 2006 at 12:07 UTC | |
by bart (Canon) on Sep 01, 2006 at 12:11 UTC | |
by kwaping (Priest) on Sep 01, 2006 at 16:36 UTC | |
by Corion (Patriarch) on Sep 01, 2006 at 16:43 UTC | |
by kwaping (Priest) on Sep 01, 2006 at 16:59 UTC | |
by eric256 (Parson) on Sep 01, 2006 at 17:51 UTC |