php - Create daily offer -
so i'm trying create daily offer exam project - idea extract information db , make kind of random function calls out random product each day, i'm pretty stuck nowhere.
any great guides or solutions?
here's how :
- create sql table store daily product (two columns
id_product
,date
should suffice) -- let's calldaily_products
- create php script select product id today's date
daily_products
- if there none, sql request on
products
table return 1 lineorder rand()
, store product id , today's date indaily_products
- if there one, nothing
- if there none, sql request on
- call php script daily
- either
cronjob
execute every day, @ 00:01 - or on first daily visit of website (in case, should called before website rendering)
- either
Comments
Post a Comment