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 :

  1. create sql table store daily product (two columns id_product , date should suffice) -- let's call daily_products
  2. create php script select product id today's date daily_products
    • if there none, sql request on products table return 1 line order rand(), store product id , today's date in daily_products
    • if there one, nothing
  3. 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)

Comments

Popular posts from this blog

asynchronous - C# WinSCP .NET assembly: How to upload multiple files asynchronously -

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -