Romain Groleau wrote:

Hi,

Howdy



my sql query is select a,b ....


and the code to store the results in stach is :

my @stach;
while( my @ary=$sth->fetchrow_array()) {
push @stach, [EMAIL PROTECTED] ;
}
[EMAIL PROTECTED] if a reference just like [EMAIL PROTECTED]

you could do the same thing by doing:

for( @{ $dbh->selectall_arrayref($query) } ) {

my ($a_column,$b_column) = @{ $_ };

}

And all that without having to do the prepare, execute, getchrow_array dance or worry about array names and simplifying the process of processing the data :)

HTH

Lee.M - JupiterHost.Net

and this doesn't work if I look at @stach there are
only ARRAY(0x81cff60) in the two columns of @stach.

Can you help me plz?

Thank you.

Höstrusk och grå moln - köp en resa till solen på Yahoo! Resor på adressen http://se.docs.yahoo.com/travel/index.html


-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>




Reply via email to