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.
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.