Gossamer Forum
Home : Products : Gossamer Links : Development, Plugins and Globals :

LIKE statement in query_sth

Quote Reply
LIKE statement in query_sth
hello,

I have a query_sth like this:

my $sth = $link_db->query_sth ( {
isPopular => 'Yes',
isValidated => 'Yes',
mh => $opts->{mh},
nh => $opts->{nh},
sb => $opts->{sb},
so => $opts->{so},
ww => 1
});

Now i would like to add a LIKE statement such as:

my $sth = $link_db->select ( GT::SQL::Condition->new ('Title', 'LIKE', $letter.'%') );

how can I add the LIKE statement in the query_sth listen above??

I,ve done something with code like this:

my $letter = 'A';
my $cond = GT::SQL::Condition->new (
'Title', 'LIKE', $letter.'%'
);

my $sth = $link_db->query_sth ( {
isValidated => 'Yes',
mh => $opts->{mh},
nh => $opts->{nh},
sb => $opts->{sb},
so => $opts->{so},
ww => 1
},
$cond,
{ GT_SQL_SKIP_CHECK => 1 }
);

but without success, I get all links.
Is there a suggestion for this?
Quote Reply
Re: [ridesworld] LIKE statement in query_sth In reply to
Hi,

Check out my plugin "alpha bar" (or something like that).

It has code similar to what you are trying to do.


PUGDOG� Enterprises, Inc.

The best way to contact me is to NOT use Email.
Please leave a PM here.