Re: PERL Array to hash table help

2001-08-08 Thread Brett W. McCoy
On Wed, 8 Aug 2001, David Draley wrote: > - > my $sth = $dbh->prepare( "SELECT * FROM survey WHERE facil = > '$species'" ); > > $sth->execute(); > > @rows = $sth->fetchrow_array(); > > > . > > @rows > You need to loop through your result set unti

Re: PERL Array to hash table help

2001-08-08 Thread Lisa Nyman
Hi, On Wed, 8 Aug 2001, David Draley wrote: > I am writing a search script that will retrieve records from an MYSQL db. I > have used an array to store the returned records, but I am having problems > pushing the array into a hash table. So far, my search script only returns > the first rec

RE: PERL Array to hash table help

2001-08-08 Thread mark crowe (JIC)
fetchrow_array() will just get you one row of results at a time (as you're finding). What you want to do is loop through all the lines of results that you get, along the lines of: while (my @rows = $sth->fetchrow_array()) { # Gets each row of the #

Re: PERL Array to hash table help

2001-08-08 Thread Mel Matsuoka
At 01:27 PM 08/08/2001 +, David Draley wrote: >hello - > >I am writing a search script that will retrieve records from an MYSQL db. I >have used an array to store the returned records, but I am having problems >pushing the array into a hash table. So far, my search script only returns >th

Re: PERL Array to hash table help

2001-08-08 Thread darren chamberlain
David Draley <[EMAIL PROTECTED]> said something to this effect on 08/08/2001: > hello - > > I am writing a search script that will retrieve records from an > MYSQL db. I have used an array to store the returned records, > but I am having problems pushing the array into a hash table. > So far, my