mlh2 has asked for the wisdom of the Perl Monks concerning the following question:
use DBI; $dsn = "DBI:mysql:database=numbers;host=localhost"; $dbh = DBI->connect($dsn, 'user', 'password'); $sth = $dbh->prepare("SELECT * FROM numbers"); $sth->execute;
It would then repeat that for each row in the table. Can this be done? Mikewhile (my $ref = $sth->SOMETING HERE) { print "The name field " . $ref[name]; print "The phone1 field " . $ref[phone1]; print "The phone2 field " . $ref[phone2]; }
2004-12-16 Janitored by Arunbear - replaced pre tags with code tags, as per Monastery guidelines
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Mysql Issues (newb)
by gaal (Parson) on Dec 16, 2004 at 19:38 UTC | |
|
Re: Mysql Issues (newb)
by nedals (Deacon) on Dec 16, 2004 at 20:16 UTC | |
by r34d0nl1 (Pilgrim) on Dec 17, 2004 at 02:13 UTC | |
|
Re: Mysql Issues (newb)
by sasikumar (Monk) on Dec 17, 2004 at 06:55 UTC |