sqspat has asked for the wisdom of the Perl Monks concerning the following question:
## Perl script to log into Database and quesry Tables use Net::MySQL; my $mysql = Net::MySQL->new( hostname => 'testscript', database => 'test', user => 'tester', password => 'tester' ); # SELECT example $mysql->query(q{SELECT * FROM product_releases}); my $record_set = $mysql->create_record_iterator; while (my $record = $record_set->each) { printf "First column: %s Next column: %s\n", $record->[0], $record->[1]; } $mysql->close;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: NET:MySQL database connection error -- (Using password: NO) at MySQL_queryDB.pl
by marto (Cardinal) on Sep 24, 2009 at 11:20 UTC | |
by sqspat (Acolyte) on Sep 24, 2009 at 12:09 UTC | |
by marto (Cardinal) on Sep 24, 2009 at 13:16 UTC | |
by sqspat (Acolyte) on Sep 24, 2009 at 14:01 UTC | |
by zwon (Abbot) on Sep 24, 2009 at 17:02 UTC | |
|
Re: NET:MySQL database connection error -- (Using password: NO) at MySQL_queryDB.pl
by proceng (Scribe) on Sep 24, 2009 at 20:17 UTC |