Gossamer Forum
Home : Products : DBMan SQL : Discussion :

Condition Object

Quote Reply
Condition Object
Could someone please tell me the correct format for adding an OR clause to the WHERE part of the following query.

my $sth = $table->select (['fieldname'],{'fieldname' => $home->{cgi}->{fieldname}???? } );


I thought it should be something like the following but it doesn't work.

my $sth = $table->select (['fieldname'],{'fieldname' => $home->{cgi}->{fieldname}, 'OR', 'fieldname2' => $home->{cgi}->{fieldname2} } );


After posting in the SQL forum I was told that this forum would be more appropriate as the code is specific to GT::SQL. I was also told that I need to use a Condition Object. I read the Help section but cannot work out how to change what I have into a condition object. I would appreciate it if someone could show me how to do it.

Thank you.

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