On Sat Apr 11 12:51:21 2009, CAPTTOFU wrote:
Show quoted text> Please see
http://svn.perl.org/modules/DBD-mysql/trunk
>
> I will be releasing this week 4.011
>
> Try this out (mysql_bind_type_guessing - makes it so no quotes will be
> used if number - works with floats too;):
>
> use strict;
> use warnings;
>
> use DBI;
> use Data::Dumper;
>
> my $create= <<'EOTABLE';
> create table bigt1 (
> id bigint unsigned not null default 0
> )
> EOTABLE
>
> #my $dbh= DBI->connect('DBI:mysql:test', 'user', 'pass', {
> mysql_bind_type_guessing => 2})
> # or die "unable to connect $DBI::errstr";
> my $dbh= DBI->connect('DBI:mysql:test', 'user', 'pass')
> or die "unable to connect $DBI::errstr";
>
> $dbh->{mysql_bind_type_guessing}= 1;
>
> $dbh->do('drop table if exists bigt1');
> $dbh->do($create);
>
> my $statement= 'insert into bigt1 (id) values (?)';
>
> my $sth= $dbh->prepare($statement);
>
> my $rows= $sth->execute('9999999999999999');
> print "rows $rows\n";
>
> $statement= 'update bigt1 set id = ?';
> $sth= $dbh->prepare($statement);
> $rows= $sth->execute('9999999999999998');
> print "rows $rows\n";
>
> my $retref= $dbh->selectall_arrayref('select * from bigt1');
> print Dumper $retref;
I meant to add:
439 Query insert into bigt1 (id) values (9999999999999999)
439 Query update bigt1 set id = 9999999999999998
439 Query select * from bigt1
From log