Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: Coding superstitions

by buckaduck (Chaplain)
on Jan 08, 2002 at 18:12 UTC ( #137127=note: print w/ replies, xml ) Need Help??


in reply to Coding superstitions

When using DBI, my database connection handle is always named $dbh. This might not seem too superstitious (after all, if my code looks like the example code it should be easier for others to follow), but I confess that I break into a cold sweat at the very thought of using any other variable name.

Then there's my SQL statement handle, $sth. What if I'm writing a program that uses multiple statement handles? I'm sweating already...

buckaduck


Comment on Re: Coding superstitions
Select or Download Code
Re: Re: Coding superstitions
by jepri (Parson) on Jan 09, 2002 at 10:36 UTC
    My superstition for databases is... don't use multiple statement handles. If I need more than one, I use different $dbh1, $dbh2. Had funny effects form multiple $sth once, don't wanna repeat. It was probably my fault somewhere, though.

    ____________________
    Jeremy
    I didn't believe in evil until I dated it.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (6)
As of 2014-09-20 12:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (159 votes), past polls