- let sth = dbh#prepare_cached "insert into images
- (hostid, name, image, width, height,
- alt, title, longdesc, class,
- mime_type, thumbnail, tn_width,
- tn_height, tn_mime_type, upload_date)
- select hostid, name_deleted, image,
- width, height, alt, title, longdesc,
- class, mime_type, thumbnail,
- tn_width, tn_height, tn_mime_type,
- upload_date
- from images
- where hostid = ? and id = ?" in
- sth#execute [`Int hostid; `Int id];
+ PGSQL(dbh) "insert into images
+ (hostid, name, image, width, height,
+ alt, title, longdesc, class,
+ mime_type, thumbnail, tn_width,
+ tn_height, tn_mime_type, upload_date)
+ select hostid, name_deleted, image,
+ width, height, alt, title, longdesc,
+ class, mime_type, thumbnail,
+ tn_width, tn_height, tn_mime_type,
+ upload_date
+ from images
+ where hostid = $hostid and id = $id";