-->-----Original Message----- -->From: sean peters [mailto:[EMAIL PROTECTED] -->Sent: Monday, October 27, 2003 10:17 AM -->To: [EMAIL PROTECTED] -->Subject: bind params and default values --> -->Hi all, i've been having an issue with binding params. If i have created -->an -->INSERT query with a param binding to a particular column, call it column -->"A", is there any way that i can use that (prepared) query to get the db -->defined default value into column A? Yes don't put it in your list. Mysql will automatically add the default on the insert if it is not defined. For example Col Default A - default 'Hi' B - default 'Lo' C - default '0'
my $query = 'INSERT INTO made_up_table (B,C) VALUES (?,?)'; $DBI_dbh->prepare($query); @data = ('NotLo','1'); $DBI_dbh->execute(@data); Does this help? --> -->Im at a loss! -->thanks much, --> -->sean peters -->[EMAIL PROTECTED] --> -->BTW: i have posted a similar question to perlmonks under the title "DBI -->bind -->params & column defaults" --> -->-- - Dathan Vance Pattishall - Sr. Programmer and mySQL DBA for FriendFinder Inc. - http://friendfinder.com/go/p40688 -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]