• I’m building a price comparison site and I want to show a price history chart on each product post, listing every change together with its date. I’m using regular post_meta to store data such as URL and ‘in stock’ but the question is how I store a bunch of prices with their date.

    20150615 – 49
    20150616 – 44
    20150617 – 45
    etc.

    Any ideas? I was first thinking about creating a new post for every price change but I assume it would kill the database pretty quickly.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The most efficient and easy way to this is to set up another database table, and store the records in there. You’d only need columns for the product ID, price and date. That way you’ll be able to retrieve the values very easily.

    Thread Starter Stefan Nilsson

    (@ducedo)

    Thanks catacaustic. It sure sounds like the best idea.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Store price history for a price comparison site’ is closed to new replies.