At 19:32 -0600 11/25/02, Ronald Petty wrote:
I am trying to get my TIMESTAMPE field to auto update (use the current time for inserts). However it keeps going to all 0000000000, I read the documentation and it says that is because it is getting an invalid input. However it also states if you put null in it will work, it does on the server, but when I use perl/dbi it goes to 000000
That's because to specify NULL in DBI, you should use undef.
Here is the code my $sth1 = $dbh->prepare("insert into CONTACT values (?,?,?,?,?,?,?,?)"); $sth1->execute($query->param("NAME"), $query->param("COMPANY"), $query->param("EMAIL"), $query->param("PHONE"), $quer y->param("ADDRESS"), $query->param("SUBJECT"), $query->param("MESSAGE"), null) or die "Can't execute SQL statement: $ DBI::errstr\n"; and the results for the ones using the form about have all zeros, if I do insert into CONTACT (NAME,COMPANY,EMAIL,PHONE,ADDRESS,SUBJECT,MESSAGE,DATE) values ("Ron Petty", "asdfasdf", "[EMAIL PROTECTED]", "asdfddd", "sdfsadfasdfsad", "Testing contact", "Hey did this thing work?", null); It works, any ideas? Thanks Ron
--------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php