Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

dbi faq updates

by ralphie (Friar)
on Mar 18, 2002 at 12:27 UTC ( [id://152466]=perlmeditation: print w/replies, xml ) Need Help??

monkers-

over the weekend ilya sterin posted a note to the dbi list requesting comments on the proposed additions to the dbi faq, and suggestions for further additions. the proposed additions can be found here. the current faq, of course, is here

Replies are listed 'Best First'.
Re: dbi faq updates
by gav^ (Curate) on Mar 19, 2002 at 04:23 UTC
    I saw this and thought I'd fire off a couple of answers to questions that have stumped me in the past. Hopefully if more people can post tips then the FAQ can be better for everyone. Here's my contribution here in case it's handy.

    Why does selectall_hashref now fail (changed in 1.20):
    change $hr = $dbh->selectall_hashref($sql, {}, @bind) to $hr = $dbh->selectall_arrayref($sql, {Slice=>{}}, @bind)

    Why does getting values from the CGI.pm param function not work as expected when I insert them into the database?
    CGI.pm returns an empty parameter as an empty string '' so you need to make sure you undef them first!

    How do I use a DSN-less connection with DBD::ODBC?
    Look up the exact name of the driver in ODBC manager for example for Access it is "Access Driver (*.mdb)" and use this string as the DSN:
    $dsn = "driver=$driver;dbq=$path_to_db"; $dbh = DBI->connect("dbi:ODBC:$dsn");

    gav^

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (2)
As of 2026-02-16 14:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.