srfrogster has asked for the wisdom of the Perl Monks concerning the following question:
!#/usr/bin/perl use Net::MySQL; my $host = 'localhost'; my $db = 'MyDB'; my $db_user = 'mysql'; my $db_password = 'mysql'; my $mySQL = Net::MySQL->new( hostname => $host, database => $db, user => $db_user, password => $db_password); $mySQL->query("SELECT * FROM Users WHERE CSL = 'hsanche'"); my $record_set = $mySQL->create_record_iterator; while (my $record = $record_set->each) { print $record->[0]."\n"; } $mySQL->close; exit 0;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: MySQL doesn't work with perl
by dragonchild (Archbishop) on Jan 09, 2008 at 16:15 UTC | |
by WoodyWeaver (Monk) on Jan 09, 2008 at 20:53 UTC | |
by srfrogster (Initiate) on Jan 10, 2008 at 16:18 UTC |