Hi everyone,

   I have an issue using the NOW() command to insert the time into a
timestamp(14) field in a database:

   I am using DBI on a Solaris x86 server with Mysql 2.23.51.

  here is part of the code:

<snip>
foreach my $host_db (@db_list) {
                my $query = $dbh->prepare (qq{
                   INSERT INTO tbl_MysqlProcess (hostname, db_name,
status, inut_time) VALUES(?,?,?,?)
                });
                $query->execute ("$host_name", "$host_db", "queued",
NOW());
        }
<snip>

a perl -wcT script.pl, shows syntax is ok but when I execute I get:

Undefined subroutine &main::NOW called at serverBackup.pl line 116.

I used:

DBI_TRACE=2 perl serverBackup.pl

to try and track it down but nothing.  I thought that maybe I could not
use this in a subroutine but I am not too sure how to tackle this one..

Can any one help mewith this?  Or steer me in the right direction??


thanks for the help...

--chad

   I guess I can't do this?????

Reply via email to