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,

Quote:
1. The plugin doesn't seem to care the number


Oops.. I forgot, let uninstall the plugin and change LetterSearch.pm:
GT::Plugins->action ( STOP );
my $rows = $home->{cgi}->{mh} || 25;
my $pg_current = $home->{cgi}->{nh} || 1;
my $rec_start = ($pg_current == 1) ? 0 : ($pg_current-1)*$rows;
my $limit = "LIMIT ".$rec_start.",".$rows;

my $db = $home->{cgi}->{db};
my $table = $DB->table($db);
$table->select_options($limit);
my $sth = $table->select ( GT::SQL::Condition->new ($column, 'LIKE', "$letter%") );
my $hits = $table->hits();
....

Quote:
2. I realize, to my happy surprise,


Definitely, just create a search form like:
<input type=hidden name="db" value="<%db%>">
<input type=hidden name="do" value="search_results">
<input type=hidden name="col" value="field_name">
<input type=text name="let" value="">
That should work as what you're supposed to be.

Cheers,

TheStone.

B.

Last edited by:

TheStone: Jan 11, 2002, 1:52 PM

Edit Log: