|
An Introduction to Class::DBI - Comparing DBI and Class::DBI
|
9
|
|
|
SQL tasks and their Class::DBI equivalents
Creating New Records
SQL
INSERT INTO nomination (id, type, year, film_id, credit_id, takes_the_oscar)
VALUES (1, 'Best Editing', 1964, 45, 22, 1)
Class::DBI
$nomination = Nomination->create({
id => 1,
type => 'Best Editing',
year => 1999,
film_id => 45,
credit_id => 22,
takes_the_oscar => 1,
});
|
|