Subject: | Date Functions less forgiving in DBD vs sqlite3 cmd |
Date: | Thu, 3 Sep 2015 12:56:19 -0600 |
To: | <bug-DBD-SQLite [...] rt.cpan.org> |
From: | "Eric Frazier" <efrazier [...] doubleprime.com> |
SQLite version 3.3.6
Enter ".help" for instructions
Show quoted text
sqlite> SELECT date('now','-1day');
2015-09-02
Show quoted textsqlite> SELECT date('now','-1 day');
2015-09-02
vs
WORKS:
#!/usr/bin/perl
use DBI;
my $dbh =
DBI->connect('dbi:SQLite:dbname=foo.sqlite','','',{AutoCommit=>1,RaiseError=
Show quoted text>1,PrintError=>0});
print $dbh->selectrow_array("SELECT date('now','-1 day')"),"\n";
[efrazier@emailsc2 ~]$ perl sqltest.pl
2015-09-02
Doesn't work:
#!/usr/bin/perl
use DBI;
my $dbh =
DBI->connect('dbi:SQLite:dbname=foo.sqlite','','',{AutoCommit=>1,RaiseError=
Show quoted text>1,PrintError=>0});
print $dbh->selectrow_array("SELECT date('now','-1day')"),"\n";
[efrazier@emailsc2 ~]$ perl sqltest.pl
And most importantly it seems to fail silently.
Other info:
[efrazier@emailsc2 ~]$ perl -v
This is perl, v5.8.8 built for x86_64-linux-thread-multi
uname -a
Linux emailsc2 2.6.18-348.el5 #1 SMP Wed Nov 28 21:22:00 EST 2012 x86_64
x86_64 x86_64 GNU/Linux
DBD::SQLite version --> package DBD::SQLite; our $VERSION = '1.48';
Thanks,
Eric