Hi David,
Is there a way to pass a value to searchExternal for how many results it displays?
I'm a php newbie as you know I have tried this but probably way off the mark:
Calling code:
<?php
$common_baseHREF = "http://www.example.com/pricetapestry/";
$common_path = "/path/to/pricetapestry/";
$mylimit = "6";
$_GET["q"] = "Search Terms";
require($common_path."searchExternal.php");
?>
Then in SearchExternal.php around line 274 I changed from:
$sql .= " LIMIT ".$config_resultsPerPage;
To:
$sql .= " LIMIT ".$mylimit;
But no joy!
Hi David,
Not sure how but I have my original code working, I started a fresh with the same code! I think I must have missed out the space before LIMIT originally in SearchExternal.php and that stopped it working that's all I can think of.
A warning to others don't try your hand at php whilst drinking red wine!
Cheers,
Chris.
Hi,
I can't see any obvious reason why that shouldn't work - and would have been pretty much what I would suggest! An alternative method, if you replace the original code, would be to override $config_resultsPerPage after config.php included. To do this, around line 38 you'll find:
require_once($common_path."config.php");
..REPLACE that with:
require_once($common_path."config.php");
$config_resultsPerPage = 6;
Hope this helps!
Cheers,
David.