more useful options | |
PerlMonks |
Problem with Class::DBI's createby Molt (Chaplain) |
on Jan 15, 2003 at 22:22 UTC ( [id://227248]=perlquestion: print w/replies, xml ) | Need Help?? |
Molt has asked for the wisdom of the Perl Monks concerning the following question: I'm currently working on learning modules that look interesting, and have decided to do this by writing a simple web-based image gallery. One of the modules I'm most interested in is Class::DBI, but I've begun to hit problems with this. I'm trying to create new database rows with the create method, yet it just doesn't seem to be working at all. The database I'm using is Postgres, and the table I'm trying to work off is set up so the id field is automatically set for me. I know it's trying to do something since if I miss out a required field it throws errors, and also if I try and load an invalid value such as a string into a numeric field. The sequence number Postgres uses to base new entries off is also incrementing. There currently aren't any constraints set up in the database itself, and the data used in the test program inserts no problem from the command line psql program. The class works fine for reading the contents of the database too. Is it possible that Class::DBI is somehow creating the row and then deleting it again? A cut-down test version of the code:
The Postgres SQL used to create the table:
Back to
Seekers of Perl Wisdom
|
|