View Single Post
Old 04-29-2012, 10:33 PM   PM User | #1
mooserider2
New to the CF scene

 
Join Date: Apr 2012
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
mooserider2 is an unknown quantity at this point
Arrow JSON to mysql with php

Ok I understand how to get normal JSON files into php variables with json_encode(); However, the json file I'm working with looks something like this:

Code:
{"daily":
{"1319846400000":250,"131993280000000",189"},"average":
{"1319846400000":190,"131993280000000",189"}}
There are 180 different daily prices with a 180 day running average (the long row of numbers is a timestamp in ms from Jan 1, 1970).

My question is how do I import this data into a table with id, timestamp, price, 180_average, one row per day?
mooserider2 is offline   Reply With Quote