Home : Products : Gossamer Links : Discussions :

Products: Gossamer Links: Discussions: Re: [Troja] Haw to use mysql command in Links sql?: Edit Log

Here is the list of edits for this post
Re: [Troja] Haw to use mysql command in Links sql?
Well then you could do something like this:
Code:
my @cond;

push @cond, ['City', '=', $city] if $city;
push @cond, ['Ratings', '>=', $ratings_min] if $ratings_min;
push @cond, ['Ratings', '<=', $ratings_max] if $ratings_max;

use GT::SQL::Condition;
my $cond = GT::SQL::Condition->new(@cond);
$cond->bool('AND'); # not really needed but we'll be explicit.

my $sth = $DB->table('Links')->select($cond);

Adrian

Last edited by:

brewt: Jan 12, 2002, 9:16 PM

Edit Log: