Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: Database connection issue

by Pope-O-Matik (Pilgrim)
on Nov 15, 2015 at 00:53 UTC ( [id://1147714]=note: print w/replies, xml ) Need Help??


in reply to Database connection issue

SELECT * FROM Games

As an aside, * is best not used outside of COUNT(), EXISTS(), and ad-hoc queries. A column list would self-document the code, and prevent any issues that may arise from column changes, such as adding, deleting, or reordering.

Replies are listed 'Best First'.
Re^2: Database connection issue
by LanX (Saint) on Nov 15, 2015 at 02:48 UTC
    > prevent any issues that may arise from column changes, such as adding, deleting, or reordering

    well using DBI->fetchrow_hashref should solve this, except maybe by not rasing an instant error for deleted columns (but the code would need to be rewritten in that case anyway.)

    Cheers Rolf
    (addicted to the Perl Programming Language and ☆☆☆☆ :)
    Je suis Charlie!

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (2)
As of 2024-04-20 09:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found