Home : Products : DBMan SQL : Discussion :

Products: DBMan SQL: Discussion: Re: [jiliu] Link to record starting with...: Edit Log

Here is the list of edits for this post
Re: [jiliu] Link to record starting with...
Hi Jian,

You should modify your script like:
Code:
...
else {
$cond->add($column,'LIKE',"$letter%");
}
my $cols = $table->cols;
my $c = GT::SQL::Condition->new();
foreach ( keys % $cols ) {
if ( $home->{cgi}->{$_} ) {
my $opt = $home->{cgi}->{"$_-opt"} || 'LIKE';
( $opt eq 'LIKE' ) ? $c->add($_, $opt, "$home->{cgi}->{$_}%") : $c->add($_, $opt, $home->{cgi}->{$_});
}
}

my $sth = $table->select (GT::SQL::Condition->new($c, $cond));


Hope that helps.

TheStone.

B.

Last edited by:

TheStone: Apr 19, 2002, 2:09 PM

Edit Log: