Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

New twist for DBD::mysql

by gmax (Abbot)
on Sep 14, 2004 at 10:06 UTC ( #390778=perlmeditation: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    # either
    my $dbh = DBI->connect("dbi:mysql:dbname;mysql_server_prepare=1",
    ...
    
    # or 
    $dbh->{ mysql_server_prepare } = 1;
    
  2. or download this
    export MYSQL_SERVER_PREPARE=1 
    
  3. or download this
    my $query = qq{SELECT col1, col2, col3 FROM mytable LIMIT ? , ?};
    my $sth = $dbh->prepare($query);
    ...
        $sth->execute($page_no, $lines);
        # do something with the page.
    }
    
  4. or download this
    $dbh1->{ mysql_server_prepare } = 0;  # emulated prepared statement
    $dbh2->{ mysql_server_prepare } = 1;  # real prepared statement
    ...
    print "prepared\n", $dbh2->{Profile}->format;
    $dbh1->{Profile} =0;
    $dbh2->{Profile} =0;
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlmeditation [id://390778]
Approved by castaway
Front-paged by broquaint
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (6)
As of 2015-07-04 13:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (60 votes), past polls