Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: Looping with DBI

by Aristotle (Chancellor)
on Jun 30, 2002 at 10:54 UTC ( [id://178350]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl -w
    use strict;
    
  2. or download this
    my $sth = $dbh->prepare ("SELECT id, body FROM news");
    $sth->execute ();
    while (my ($news_id, $news_body) = $sth->fetchrow_array()) {
    ...
        my ($comments) = $sth->fetchrow_array();
        print "$news_id, $news_body, $comments";
    }
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (6)
As of 2024-04-24 09:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found