Gossamer Forum
Home : Products : DBMan SQL : Discussion :

Re: [ktt] problem with global function

Quote Reply
Re: [ktt] problem with global function In reply to
Hi,

->query returns an array ref of array refs by default. I think what you want is:

my $sth = $table->query_sth ( { review_id => $id } );

which will return an $sth that you can call fetchrow, etc, on.

Or you may just want:

my $sth = $table->select ( { review_id => $id } );

The select method is much simpler, query is useful for taking form input and building an sql query out of it (allows you to pass in max hits, page number, sort order, etc).

Cheers,

Alex
--
Gossamer Threads Inc.
Subject Author Views Date
Thread problem with global function ktt 2049 Nov 3, 2001, 12:17 PM
Post Re: [ktt] problem with global function
Alex 1975 Nov 3, 2001, 12:38 PM