I am trying to execute the following mysql query in a perl script... my $sth = $dbh->prepare("select * from servers"); $sth->execute(); my @row; while ( @row = $sth->fetchrow_arrayref()) { foreach $row(@row) { push @SelectedArray, "$row\n\n"; } } print "@SelectedArray";
And I am getting the following error... DBD::mysql::st fetchrow_arrayref failed: fetch() without execute() at ./server_display.pl line 20 which is the while loop line. I set DBI trace and I can see the data in the table, just when it reaches the fetch it bombs on me... Sorry if this belongs more on the perl users list, but I thought everyoen would enjoy a DBI refresher...Any ideas? Thanks, Taylor Taylor Lewick Unix System Administrator Fortis Benefits 816 881 6073 "Help Wanted. Seeking Telepath..." "You Know where to apply." **************************************************************** Please Note The information in this E-mail message is legally privileged and confidential information intended only for the use of the individual(s) named above. If you, the reader of this message, are not the intended recipient, you are hereby notified that you should not further disseminate, distribute, or forward this E-mail message. If you have received this E-mail in error, please notify the sender. Thank you ***************************************************************** --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php