Gossamer Forum
Home : Products : DBMan SQL : Discussion :

Re: [jiliu] Link to record starting with...

Quote Reply
Re: [jiliu] Link to record starting with... In reply to
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
Subject Author Views Date
Thread Link to record starting with... kjetilpalm 12741 Oct 17, 2001, 10:02 AM
Thread Re: [kjetilpalm] Link to record starting with...
604 12490 Oct 17, 2001, 1:41 PM
Thread Re: [TheStone] Link to record starting with...
jiliu 12460 Dec 25, 2001, 11:42 AM
Thread Re: [jiliu] Link to record starting with...
604 12481 Dec 26, 2001, 9:50 AM
Thread Re: [TheStone] Link to record starting with...
jiliu 12488 Dec 26, 2001, 6:02 PM
Thread Re: [jiliu] Link to record starting with...
jiliu 12438 Dec 31, 2001, 10:12 AM
Thread Re: [jiliu] Link to record starting with...
604 12445 Dec 31, 2001, 10:57 AM
Thread Re: [TheStone] Link to record starting with...
jiliu 12437 Jan 11, 2002, 9:25 AM
Post Re: [jiliu] Link to record starting with...
604 12427 Jan 11, 2002, 9:40 AM
Thread Re: [jiliu] Link to record starting with...
604 12421 Jan 11, 2002, 12:16 PM
Thread Re: [TheStone] Link to record starting with...
jiliu 12441 Jan 11, 2002, 12:55 PM
Thread Re: [jiliu] Link to record starting with...
604 12454 Jan 11, 2002, 1:42 PM
Thread Re: [TheStone] Link to record starting with...
jiliu 12368 Jan 12, 2002, 2:17 PM
Thread Re: [jiliu] Link to record starting with...
604 12387 Jan 14, 2002, 8:58 AM
Thread Re: [TheStone] Link to record starting with...
jiliu 12391 Jan 14, 2002, 10:48 AM
Thread Re: [jiliu] Link to record starting with...
jiliu 12263 Apr 19, 2002, 11:55 AM
Thread Re: [jiliu] Link to record starting with...
604 12216 Apr 19, 2002, 2:08 PM
Thread Re: [TheStone] Link to record starting with...
jiliu 12242 Apr 20, 2002, 8:46 PM
Thread Re: [jiliu] Link to record starting with...
604 12184 Apr 22, 2002, 9:10 AM
Post Post deleted by jiliu
jiliu 12188 Apr 22, 2002, 9:37 AM
Post Re: [TheStone] Link to record starting with...
jiliu 12192 Apr 22, 2002, 10:14 AM
Thread Re: [TheStone] Link to record starting with...
gatman 11914 Feb 23, 2003, 5:32 AM
Thread Re: [gatman] Link to record starting with...
ManuGermany 11931 Feb 23, 2003, 12:22 PM
Post Re: [ManuGermany] Link to record starting with...
gatman 11868 Feb 23, 2003, 1:14 PM