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

[NEW PLUGIN] SearchByDate

(Page 2 of 2)
> >
Quote Reply
Re: [Andy] [NEW PLUGIN] SearchByDate In reply to
Hi Andy,

> simply the linkID, catIDs and date)
With "date", it be possible?

Thanks!

Mick
Quote Reply
Re: [MJ_] [NEW PLUGIN] SearchByDate In reply to
Hi,

In searchdata.cgi, you could try changing: (around line 128)

Code:
my $tbl = $DB->table('DateSearch');

..to:

Code:
my $tbl = $DB->table('DateSearch');
$tbl->select_options('ORDER BY Date ASC');

I'm a little suprised that code wasn't in there already (cos atm, it was just sorting by the default field - the LinkID)

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] [NEW PLUGIN] SearchByDate In reply to
Hi Andy,

I tested several times, but there is no change.

Code:
my $tbl = $DB->table('DateSearch');
$tbl->select_options('ORDER BY Date DESC');
my $totalrows;
my $cond = new GT::SQL::Condition;
my $sth;

Do You have a suggestion?

Thanks!

Mick
Quote Reply
Re: [MJ_] [NEW PLUGIN] SearchByDate In reply to
Hi,

Sorry, you probably need to also edit this:

Code:
if (defined $limit) {
$tbl->select_options("LIMIT $limit,$hits_per_page");
}

..to:
Code:
if (defined $limit) {
$tbl->select_options("ORDER BY Add_Date DESC LIMIT $limit,$hits_per_page");
} else {
$tbl->select_options("ORDER BY Add_Date DESC");
}

Hopefully that'll work Smile

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] [NEW PLUGIN] SearchByDate In reply to
Hi Andy,

It is perfect ! Thanks again. :)

Mick
> >