in reply to Using Multiple Statements MySQL
You could just save some trips and do:
Then you can work out yourself what is the parent of each item.# get a hash ref keyed to id my $data = $dbh->selectall_hashref( 'select id, name, parent from category', 'id' );
gav^
In Section
Seekers of Perl Wisdom