Gossamer Forum
Home : Products : DBMan SQL : Discussion :

Re: [jai] Condition Object

Quote Reply
Re: [jai] Condition Object In reply to
I seem to have got it working using the code below.

I have also incorporated the DISTINCT function which was the topic of another thread in this forum (http://gossamer-threads.com/...orum.cgi?post=232191)



my $cond1 = GT::SQL::Condition->new (
'fieldname', '=', $home->{cgi}->{fieldname},
'fieldname2', '=', $home->{cgi}->{fieldname2});
$cond1->bool ('OR');
my $sth = $table->select ('DISTINCT fieldname', $cond1);

I will assume this is the correct way to do it, unless anyone comes back with another solution.

Thanks

Simon.
Subject Author Views Date
Thread Condition Object jai 3183 Feb 13, 2003, 3:57 PM
Thread Re: [jai] Condition Object
jai 3080 Feb 14, 2003, 4:58 AM
Post Re: [jai] Condition Object
Paul 3076 Feb 14, 2003, 5:08 AM