Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # somewhere in my cgi script
- sub first_run
- {
- my $dbh = DBI->connect('dbi:DBM:');
- $dbh = DBI->connect("dbi:DBM:", "", "",{ AutoCommit => 1, RaiseError => 1, f_dir=>$DATABASE_DIR} );
- unless ($dbh)
- {
- print "<br>Cannot connect: $DBI::errstr";
- return undef;
- }
- $dbh->do("CREATE TABLE uploads( user_name TEXT,
- file_name TEXT,
- upload_date TEXT ) ");
- $dbh->disconnect( );
- }
Add Comment
Please, Sign In to add comment