Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re^2: prepare statement within DBI

by Smylers (Pilgrim)
on Aug 26, 2004 at 14:27 UTC ( [id://386035]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    sub fetch_count
    {
    ...
    
      $db->selectrow_array("SELECT COUNT(*) FROM $table");
    }
    
  2. or download this
    my $row1 = $dbh->selectrow_array('SELECT COUNT(*) FROM table_one');
    my $row2 = $dbh->selectrow_array('SELECT COUNT(*) FROM table_two');
    
  3. or download this
    my ($row1, $row2)
      = map { $dbh->selectrow_array("SELECT COUNT(*) FROM $_") }
      qw<table_one table_two>;
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (3)
As of 2024-04-26 01:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found