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 (?,?,?,?,?,?,?,?)");
>$query->param("EMAIL"), $query->param("PHONE"), $quer
>y->param("ADDRESS"), $query->param("SUBJECT"), $query->param("MESSAGE"),
>null) or die "Can't execute SQL statement: $
>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", "asdf@stripped", "asdfddd",
>"sdfsadfasdfsad", "Testing contact", "Hey did
>this thing work?", null);
>It works, any ideas?