I'm trying to get information from a database into an array in Perl. The database (MySQL) has company names each as a separate row. There are about 300. I would like to put these into an array called "@companies". Its been a long time since i've worked with Perl ...
I thought that this (above) might put the values into the array for me, but no go on this first try. What do you think?$dsn = "DBI:mysql:yip;db.yip.com"; $dbh = DBI->connect($dsn,'me','pass'); $sth = $dbh->prepare("SELECT company FROM company_public;"); $sth->execute(@companies); $dbh->disconnect;
thanks Monks,
Penguin In The Dark
In reply to Getting MySQL Data into an Array. by cdherold
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |