in reply to Getting MySQL Data into an Array.
$dsn = "DBI:mysql:yip;db.yip.com"; $dbh = DBI->connect($dsn,'me','pass'); $sth = $dbh->prepare("SELECT company FROM company_public;"); $sth->execute(); while($ref = $sth->fetchrow_arrayref) { push @companies, $ref->[0]; } $dbh->disconnect;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Getting MySQL Data into an Array.
by Parham (Friar) on Jan 06, 2002 at 21:22 UTC | |
by Corion (Patriarch) on Jan 06, 2002 at 21:53 UTC | |
by Parham (Friar) on Jan 07, 2002 at 03:03 UTC |