Gossamer Forum
Home : Products : Gossamer Links : PHP Front End :

Limit Search Categories returned

Quote Reply
Limit Search Categories returned
I'm trying to figure out how to limit the categories that are displayed in the search results. I've got alot of categories that I do not want to display and have set a db column of 'display' = 'y' or 'n'.

How do I keep the display=n categories from appearing in the $category_results?

Thanks,

Regards,
Clueless

Last edited by:

Clueless: Oct 4, 2003, 9:23 PM
Quote Reply
Re: [Clueless] Limit Search Categories returned In reply to
In admin/User/PHP/Search.inc.php, in the _query_ni() function, find;

Code:
if (strlen($cond)) {
$query .= ' WHERE ' . $cond;
}

You would try replacing this with;

Code:
if (strlen($cond)) {
$query .= ' WHERE ' . $cond . " AND display = 'y'";
}

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] Limit Search Categories returned In reply to
Thanks Andy,

It works like a charm. Smile

Regards,
Clueless