Thanks for the info on the ExecuteRandomMulti function. It looks like the first parameter simply will take the MySQL select statement.
So that leaves the remaining question: what is the appropriate statement to plug in? I had a type-o in my original post. This is what I have so far, but not sure if it's the right way to query the products. Not sure how to use the JOIN statement. Anyone else have any input on the statement:
Can you type a better (more preferred way) to write that statement, if indeed it needs a JOIN statement?Code:DISTINCT p.products_id, o.date_purchased, o.orders_id, op.orders_id FROM zen_products p, zen_orders_products op, zen_orders o WHERE p.products_status = '1' AND p.products_ordered >0 AND ( o.date_purchased <= DATE_SUB( CURDATE( ) , INTERVAL 90 DAY ) AND op.products_id = p.products_id AND op.orders_id = o.orders_id )


Reply With Quote
