You are here:  » Change Random Featured Products to Specific Products


Change Random Featured Products to Specific Products

Submitted by twdesigns on Tue, 2012-10-09 14:50 in

I thought I had seen this somewhere else but I couldn't locate it. I have this in my pto_featured.php file.
    $sql = "SELECT name,1 AS sequence FROM `".$pto_config_databaseTablePrefix."products` ORDER BY RAND() LIMIT 50";
and would like to change the random to a specific search term such as HALLOWEEN. How do I do that again?

Submitted by support on Wed, 2012-10-10 10:47

Hi there,

Have a go with:

$sql = "SELECT name,1 AS sequence FROM `".$pto_config_databaseTablePrefix."products` WHERE name LIKE '%HALLOWEEN%' ORDER BY RAND() LIMIT 50";

Cheers,
David.
--
PriceTapestry.com

Submitted by twdesigns on Tue, 2012-10-16 06:04

Awesome support as always! That works great. Thank you!!!