From: Kamran <[EMAIL PROTECTED]>
> I have a table say students with fields (id int, name char(10) ) .
>
> I have data like:-
>
> ID NAME
> == ==========
> 1 Kamran
> 2 Imran
> 3 Amir
> 4 Abid
>
>
> I want to store the result of the query "directly" in mutiple arrays,
> say @ids and @names .
>
> The traditional method will be to fetch each row one at a time and
> store that in the arrays like:-
>
> <snipped>
You could do something like this:
$data = $sth->fetchall_arrayref();
@ids = map $_->[0], @{$data};
@names = map $_->[1], @{$data};
I don't think it's any better,
Jenda
===== [EMAIL PROTECTED] === http://Jenda.Krynicky.cz =====
When it comes to wine, women and song, wizards are allowed
to get drunk and croon as much as they like.
-- Terry Pratchett in Sourcery