Andrew Gaffney <[EMAIL PROTECTED]> wrote: : My boss wants me to write a script that will allow him to browse : through the customers in our DB alphabetically. He wants all the : customer's information to display on the page. I wrote the following : as part of the script. I get the error 'Can't coerce array into hash' : at the first 'if' into the loop. What am I doing wrong? : : my $sth2 = $dbh->prepare("SELECT id FROM people ORDER BY lname, : fname, mname"); $sth2->execute; : my $people = $sth2->fetchall_arrayref;
What does $people look like? use Data::Dumper 'Dumper'; print Dumper $people; __END__ Tell us what you get. Charles K. Clarkson -- Mobile Homes Specialist 254 968-8328 -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>