in reply to Re: Getting MySQL Data into an Array.
in thread Getting MySQL Data into an Array.
if your starting out new with mysql and perl... this tutorial should help you a lot: perlguy$dsn = "DBI:mysql:yip;db.yip.com"; $dbh = DBI->connect($dsn,'me','pass'); $sth = $dbh->prepare("SELECT company FROM company_public;"); $sth->execute(); $companies = $sth->fetchall_arrayref; #a reference to an array of arra +ys of references to each row $dbh->disconnect; foreach $row (@$companies) { ($company) = @$row; print "$company\n"; #just printing it out for fun }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Getting MySQL Data into an Array.
by Corion (Patriarch) on Jan 06, 2002 at 21:53 UTC | |
by Parham (Friar) on Jan 07, 2002 at 03:03 UTC |