Gossamer Forum
Home : Products : DBMan SQL : Discussion :

Re: [kjetilpa] Sql in dbman globals

Quote Reply
Re: [kjetilpa] Sql in dbman globals In reply to
The code should be:

sub {

my $db = $DB->table('table_name');

require GT::SQL::Condition;

my $cd = GT::SQL::Condition->new('field_name', 'like', '%foobar%');

my $total = $db->select($cd, ['SUM(sum_ff) as total'])->fetchrow_array;
return $total;
}

TheStone.

B.
Subject Author Views Date
Thread Sql in dbman globals kjetilpa 2703 Sep 17, 2002, 2:32 AM
Post Re: [kjetilpa] Sql in dbman globals
604 2548 Sep 17, 2002, 9:50 AM