hi david,
I've been requested to remove or replace the "order by rand()" function of PT.
On one host, support explained the order by rand problem below.
There is no WHERE clause, so the entire products table is being group'ed,
then "order by rand()" randomizes the entire result. One issue is "order
by rand()" being very inefficient and it should not be used on shared
hosting.
Is there another function to replace the order by rand function?
I am thinking of just doing a batch search and replace for all "order by rand()" textif it is possible.
I am temporarily disabling the random products feature so that i would not be deactivated by my hosting provider.
Any suggestions?
Regards,
Atman
Hi Atman,
See the following thread regarding random Featured Products - the second example shows selecting a random merchant, and then random products from that merchant which will include a WHERE clause...
http://www.pricetapestry.com/node/2276
Cheers,
David.