Make and test SQLite it working with Perl


/ Published in: Perl
Save to your folder(s)



Copy this code and paste it in your HTML
  1. #!/usr/bin/perl
  2. use DBI;
  3. my $dbh = DBI->connect('dbi:SQLite:dbname=test.sqlite','','',{AutoCommit=>1,RaiseError=>1,PrintError=>0});
  4. print "2+2=",$dbh->selectrow_array("SELECT 2+2"),"\n";
  5.  
  6.  
  7. "if the answer is 2+2=4 all is working"

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.