You are here:  » Is there a way to show all on search?

Support Forum



Is there a way to show all on search?

Submitted by ANDREWCX on Wed, 2007-03-28 12:24 in

Hi,

Is there a way for the search to return all results in the database? It would be useful for my site RewardsDB if users could list all available 'products'.

Thanks

Andrew

Submitted by support on Wed, 2007-03-28 12:37

Hi Andrew,

Yes - you can do this by setting $config_resultsPerPage to a suitably large number in config.php, for example:

$config_resultsPerPage = 100000;

Cheers,
David.

Submitted by ANDREWCX on Wed, 2007-03-28 23:58

Hi,

Actually I think I didn't explain myself well enough. What I need is a way to list all the products in the database - they don't need to display on the same page but it is essentially so visitors can browse through all the 'products'.... So some sort of wild card?

Submitted by support on Thu, 2007-03-29 07:54

Hi Andrew,

To do that, you can use the "Begins With" search modifier (it is only in the code for backwards compatibility, it is not actually used any more). You can therefore do a query for "bw:" (without the quotes) and it will list all products in the database as the search result. To create a direct link to this from your home page, do something like this:

<a href='search.php?q=bw:'>All Products</a>

That should do the trick!
Cheers,
David.