Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

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

by dkubb (Deacon)
on Dec 29, 2001 at 11:34 UTC ( #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? | Other CB clients
Other Users?
Others lurking in the Monastery: (2)
As of 2023-01-31 00:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?