Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re^2: Need help writing a script that interacts with a MySQL DB!

by CountZero (Bishop)
on Sep 30, 2012 at 07:36 UTC ( #996470=note: print w/ replies, xml ) Need Help??


in reply to Re: Need help writing a script that interacts with a MySQL DB!
in thread Need help writing a script that interacts with a MySQL DB!

Here I'm assuming that 1st column is for name and 2nd column is for email address, you can use the correct column number here.
Since Perl arrays are zero-based, your
print "Name : $results[1], Email: $results[2]\n";
should be
print "Name : $results[0], Email: $results[1]\n";

CountZero

A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

My blog: Imperial Deltronics


Comment on Re^2: Need help writing a script that interacts with a MySQL DB!
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (4)
As of 2014-07-26 07:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (175 votes), past polls