C
Captain Beefart
Hi,
I have created a database in mysql that have a field in dtetime format.
In perl I have the string "20040728165500" to update this field in the db.
I'm using the module mysql.
Part of the code:
my $sql_statement="INSERT INTO cme (date, name) VALUES ($datetime, $name)" ;
print "$sql_statement\n";
my $sth = $dbh->query($sql_statement);
The output:
INSERT INTO cme (date, name) VALUES (20040729134000, Beefart)
Can't call method "prepare" on an undefined value
at /usr/lib/perl5/vendor_perl/5.8.2/i686-linux/Mysql.pm line 169.
Anyone that can tell me how to do it?
I've been searching for more than a week now.
I have created a database in mysql that have a field in dtetime format.
In perl I have the string "20040728165500" to update this field in the db.
I'm using the module mysql.
Part of the code:
my $sql_statement="INSERT INTO cme (date, name) VALUES ($datetime, $name)" ;
print "$sql_statement\n";
my $sth = $dbh->query($sql_statement);
The output:
INSERT INTO cme (date, name) VALUES (20040729134000, Beefart)
Can't call method "prepare" on an undefined value
at /usr/lib/perl5/vendor_perl/5.8.2/i686-linux/Mysql.pm line 169.
Anyone that can tell me how to do it?
I've been searching for more than a week now.