Gossamer Forum
Home : Products : DBMan SQL : Discussion :

Re: [Suomi] Fetchrow_array() confusion?

Quote Reply
Re: [Suomi] Fetchrow_array() confusion? In reply to
Hi,

Try:

my ($color, $amount) = $self->table('apps')->select({'UserID' => $user}, ['color', 'amount'])->fetchrow_array();

As paul mentioned, fetchrow array is returning an array of values, since you were assigning it to a single variable, you only got the first result. Everything else looks good.

Cheers,

Alex
--
Gossamer Threads Inc.
Subject Author Views Date
Thread Fetchrow_array() confusion? Suomi 2638 Nov 20, 2001, 10:34 AM
Thread Re: [Suomi] Fetchrow_array() confusion?
Paul 2574 Nov 20, 2001, 2:11 PM
Thread Re: [PaulW] Fetchrow_array() confusion?
Suomi 2573 Nov 20, 2001, 6:55 PM
Post Re: [Suomi] Fetchrow_array() confusion?
Paul 2567 Nov 21, 2001, 4:59 AM
Thread Re: [Suomi] Fetchrow_array() confusion?
Alex 2564 Nov 26, 2001, 10:29 AM
Post Re: [Alex] Fetchrow_array() confusion?
Suomi 2543 Nov 26, 2001, 4:20 PM