Help for this page

Select Code to Download


  1. or download this
    my $dbh = DBI->connect("dbi:SQLite:dbname=$dbfile","","",{RaiseError =
    +> 1})
        or die "Couldn't connect to database: " . DBI->errstr;
    
  2. or download this
    my $get_all_user_rows = $dbh->prepare ("SELECT * FROM users");
    
  3. or download this
    $get_all_user_rows->execute();
    
  4. or download this
    my $all_row_ref = $get_all_user_rows->fetchall_arrayref;
    
  5. or download this
    foreach my $row_ref (@$all_row_ref)
    {
       print "@$row_ref\n";
    }