Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

(dkubb) Re: (1) dbi style questions (code, discussion)

by dkubb (Deacon)
on Dec 29, 2001 at 11:34 UTC ( [id://135089]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my $sth = $dbh->prepare(q{
      INSERT
        INTO table
             (col1, col2, col3)
      VALUES (?, ?, ?)
    });
    
  2. or download this
    my $tuple = $dbh->selectrow_array(q{
        SELECT col1
          FROM table1
    ...
      {},
      $someval,
    );
    
  3. or download this
    my $sth_get_id = $dbh->prepare(q{
      SELECT id
        FROM contact
    ...
    
      print "$email -> $id\n";
    }
    
  4. or download this
    my $emails = $dbh->selectcol_arrayref(q{
        SELECT email
          FROM contact
    ...
    );
    
    foreach my $email (@$emails) { ...
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (4)
As of 2024-04-18 03:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found