Can anyone provide syntax to create a table trigger preferably with DBI's do() method. It doesn't seem to like me putting everything on one line. Not sure what i'm doing wrong. Here's what I've got:
$dbh->do("CREATE TABLE image(img_id integer primary key, md5sum text, path text, name text, date DATE)");
$dbh->do("CREATE TRIGGER insert_img_date AFTER INSERT ON image BEGIN UPDATE image SET date = DATETIME('NOW') END");