Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: Perl Not returning SQL query result

by Marshall (Canon)
on May 12, 2021 at 19:06 UTC ( [id://11132511]=note: print w/replies, xml ) Need Help??

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";
    }
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11132511]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (3)
As of 2024-04-25 09:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found