Hello David.
In the older version of the script, in search.php and products.php files, I find a few queries like:
SELECT *, MIN(price) AS minPrice, MAX(price) AS maxPrice, COUNT(id) AS numMerchants....
My question is:
I can not find any references to "maxPrice" elsewhere in the script. - Is it safe to remove the part "MAX(price) AS maxPrice," from the queries or am I missing something and it is actually used for something?
Thanks in advance
Paul.
Hello Paul,
Yes - that can be safely removed. It's legacy from a very early version of the script. There shouldn't be any performance implication since all product records matching the WHERE clause must be scanned anyway (e.g. in order to calculate MIN(price) which is required) but you're correct it's not longer required to be there...
Cheers,
David.