D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
proc
/
self
/
root
/
usr
/
share
/
doc
/
perl-DBI
/
Filename :
profile.pl
back
Copy
#!/usr/bin/perl -w use DBI; $dbh = DBI->connect('dbi:SQLite:dbname=ex_profile.db', '', '', { RaiseError => 1 }); $dbh->do("DROP TABLE IF EXISTS ex_profile"); $dbh->do("CREATE TABLE ex_profile (a int)"); $dbh->do("INSERT INTO ex_profile (a) VALUES ($_)", undef) for 1..100; #$dbh->do("INSERT INTO ex_profile (a) VALUES (?)", undef, $_) for 1..100; my $select_sql = "SELECT a FROM ex_profile"; $dbh->selectall_arrayref($select_sql); $dbh->selectall_hashref($select_sql, 'a'); my $sth = $dbh->prepare($select_sql); $sth->execute; while ( @row = $sth->fetchrow_array ) { } __DATA__
Name
Size
Last Modified
Owner
Permissions
Actions
README.md
3.475
KB
April 05 2013 9:49:53
root
0644
perl_dbi_nulls_test.pl
6.136
KB
April 04 2013 10:17:19
root
0644
profile.pl
0.58
KB
April 04 2013 10:17:19
root
0644
2017 © D7net | D704T team