You are here:  » search.php - maxPrice??

Support Forum



search.php - maxPrice??

Submitted by paul30 on Fri, 2010-01-29 23:31 in

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.

Submitted by support on Sat, 2010-01-30 17:34

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.