Array
(
[0] => Array
(
[api_query] => http://api.salecamel.com?api_key=123456789&do_get=local_locations
[execution_time] => 0.13919496536255
[from_api] => Array
(
[0] => Array
(
[mysql_query] => SELECT DISTINCT merch_region, merch_locality, merch_country, merch_id FROM merchants_local ORDER BY merch_region, merch_locality
[execution_time] => 0.054004907608032
)
)
)
[1] => Array
(
[api_query] => http://api.salecamel.com?api_key=123456789&do_get=get_local&location=Richmond%2C+VA%2C+US&radius=10&search_limit=15
[execution_time] => 9.2684578895569
[from_api] => Array
(
[0] => Array
(
[mysql_query] => SELECT merch_latitude, merch_longitude
FROM merchants_local
WHERE merch_locality='Richmond' AND merch_region='VA'
[execution_time] => 0.0085489749908447
)
[1] => Array
(
[news_api_call] => http://hyperlocal-api.outside.in/v1.1/states/VA/cities/Richmond/stories?dev_key=6at3bn2z23e33eu92utrq6pt&sig=a06a8539fb1c4b35a06b168b8d2bab26&no-vertical=obituaries
)
[2] => Array
(
[mysql_query] => SELECT data FROM cache_news
WHERE locality = 'Richmond'
AND region = 'VA'
AND country = 'US'
AND expires > '1369166230'
[execution_time] => 0.00040507316589355
)
[3] => Array
(
[mysql_query] => INSERT INTO cache_news
(`locality`, `region`, `country`, `expires`, `data`)
VALUES
(
'Richmond',
'VA',
'US',
'1369169830',
'{\"links\":{\"last\":\"http://hyperlocal-api.outside.in/v1.1/states/VA/cities/Richmond/stories?no-vertical=obituaries&page=1&dev_key=6at3bn2z23e33eu92utrq6pt&sig=a06a8539fb1c4b35a06b168b8d2bab26\",\"first\":\"http://hyperlocal-api.outside.in/v1.1/states/VA/cities/Richmond/stories?no-vertical=obituaries&page=1&dev_key=6at3bn2z23e33eu92utrq6pt&sig=a06a8539fb1c4b35a06b168b8d2bab26\"},\"total\":0,\"location\":{\"display_name\":\"Richmond, VA\",\"state\":\"Virginia\",\"url\":\"http://outside.in/richmond-va?utm_content=Richmond_VA&utm_source=API_OutsideIn_0&utm_medium=API&utm_campaign=APILinkback\",\"lng\":-77.47543334960938,\"lat\":37.529296875,\"uuid\":\"65501618-ce93-4032-9726-c3b166f2c38f\",\"city\":\"Richmond\",\"category\":{\"name\":\"city\",\"display_name\":\"City / Town / Village\"},\"state_abbrev\":\"VA\",\"url_name\":\"richmond-va\",\"hot_for_requested\":false},\"stories\":[]}'
)
ON DUPLICATE KEY UPDATE expires = '1369169830', data = '{\"links\":{\"last\":\"http://hyperlocal-api.outside.in/v1.1/states/VA/cities/Richmond/stories?no-vertical=obituaries&page=1&dev_key=6at3bn2z23e33eu92utrq6pt&sig=a06a8539fb1c4b35a06b168b8d2bab26\",\"first\":\"http://hyperlocal-api.outside.in/v1.1/states/VA/cities/Richmond/stories?no-vertical=obituaries&page=1&dev_key=6at3bn2z23e33eu92utrq6pt&sig=a06a8539fb1c4b35a06b168b8d2bab26\"},\"total\":0,\"location\":{\"display_name\":\"Richmond, VA\",\"state\":\"Virginia\",\"url\":\"http://outside.in/richmond-va?utm_content=Richmond_VA&utm_source=API_OutsideIn_0&utm_medium=API&utm_campaign=APILinkback\",\"lng\":-77.47543334960938,\"lat\":37.529296875,\"uuid\":\"65501618-ce93-4032-9726-c3b166f2c38f\",\"city\":\"Richmond\",\"category\":{\"name\":\"city\",\"display_name\":\"City / Town / Village\"},\"state_abbrev\":\"VA\",\"url_name\":\"richmond-va\",\"hot_for_requested\":false},\"stories\":[]}'
[execution_time] => 0.1394259929657
)
[4] => Array
(
[mysql_query] => SELECT data FROM cache_weather
WHERE locality = 'Richmond'
AND region = 'VA'
AND country = 'US'
AND expires > '1369166230'
[execution_time] => 0.0006098747253418
)
[5] => Array
(
[mysql_query] => INSERT INTO cache_weather
(`locality`, `region`, `country`, `expires`, `data`)
VALUES
(
'Richmond',
'VA',
'US',
'1369169830',
'{ \"data\": { \"current_condition\": [ {\"cloudcover\": \"100\", \"humidity\": \"70\", \"observation_time\": \"07:57 PM\", \"precipMM\": \"3.4\", \"pressure\": \"1015\", \"temp_C\": \"26\", \"temp_F\": \"79\", \"visibility\": \"16\", \"weatherCode\": \"122\", \"weatherDesc\": [ {\"value\": \"Overcast\" } ], \"weatherIconUrl\": [ {\"value\": \"http:\\/\\/www.worldweatheronline.com\\/images\\/wsymbols01_png_64\\/wsymbol_0004_black_low_cloud.png\" } ], \"winddir16Point\": \"SW\", \"winddirDegree\": \"220\", \"windspeedKmph\": \"11\", \"windspeedMiles\": \"7\" } ], \"request\": [ {\"query\": \"Richmond, United States Of America\", \"type\": \"City\" } ], \"weather\": [ {\"date\": \"2013-05-21\", \"precipMM\": \"3.4\", \"tempMaxC\": \"30\", \"tempMaxF\": \"86\", \"tempMinC\": \"21\", \"tempMinF\": \"70\", \"weatherCode\": \"356\", \"weatherDesc\": [ {\"value\": \"Moderate or heavy rain shower\" } ], \"weatherIconUrl\": [ {\"value\": \"http:\\/\\/www.worldweatheronline.com\\/images\\/wsymbols01_png_64\\/wsymbol_0010_heavy_rain_showers.png\" } ], \"winddir16Point\": \"SW\", \"winddirDegree\": \"220\", \"winddirection\": \"SW\", \"windspeedKmph\": \"22\", \"windspeedMiles\": \"14\" }, {\"date\": \"2013-05-22\", \"precipMM\": \"0.1\", \"tempMaxC\": \"30\", \"tempMaxF\": \"86\", \"tempMinC\": \"21\", \"tempMinF\": \"70\", \"weatherCode\": \"113\", \"weatherDesc\": [ {\"value\": \"Sunny\" } ], \"weatherIconUrl\": [ {\"value\": \"http:\\/\\/www.worldweatheronline.com\\/images\\/wsymbols01_png_64\\/wsymbol_0001_sunny.png\" } ], \"winddir16Point\": \"SW\", \"winddirDegree\": \"220\", \"winddirection\": \"SW\", \"windspeedKmph\": \"28\", \"windspeedMiles\": \"17\" }, {\"date\": \"2013-05-23\", \"precipMM\": \"10.3\", \"tempMaxC\": \"28\", \"tempMaxF\": \"83\", \"tempMinC\": \"17\", \"tempMinF\": \"63\", \"weatherCode\": \"356\", \"weatherDesc\": [ {\"value\": \"Moderate or heavy rain shower\" } ], \"weatherIconUrl\": [ {\"value\": \"http:\\/\\/www.worldweatheronline.com\\/images\\/wsymbols01_png_64\\/wsymbol_0010_heavy_rain_showers.png\" } ], \"winddir16Point\": \"SSW\", \"winddirDegree\": \"210\", \"winddirection\": \"SSW\", \"windspeedKmph\": \"26\", \"windspeedMiles\": \"16\" }, {\"date\": \"2013-05-24\", \"precipMM\": \"0.0\", \"tempMaxC\": \"23\", \"tempMaxF\": \"73\", \"tempMinC\": \"6\", \"tempMinF\": \"43\", \"weatherCode\": \"113\", \"weatherDesc\": [ {\"value\": \"Sunny\" } ], \"weatherIconUrl\": [ {\"value\": \"http:\\/\\/www.worldweatheronline.com\\/images\\/wsymbols01_png_64\\/wsymbol_0001_sunny.png\" } ], \"winddir16Point\": \"NNW\", \"winddirDegree\": \"337\", \"winddirection\": \"NNW\", \"windspeedKmph\": \"29\", \"windspeedMiles\": \"18\" } ] }}'
)
ON DUPLICATE KEY UPDATE expires = '1369169830', data = '{ \"data\": { \"current_condition\": [ {\"cloudcover\": \"100\", \"humidity\": \"70\", \"observation_time\": \"07:57 PM\", \"precipMM\": \"3.4\", \"pressure\": \"1015\", \"temp_C\": \"26\", \"temp_F\": \"79\", \"visibility\": \"16\", \"weatherCode\": \"122\", \"weatherDesc\": [ {\"value\": \"Overcast\" } ], \"weatherIconUrl\": [ {\"value\": \"http:\\/\\/www.worldweatheronline.com\\/images\\/wsymbols01_png_64\\/wsymbol_0004_black_low_cloud.png\" } ], \"winddir16Point\": \"SW\", \"winddirDegree\": \"220\", \"windspeedKmph\": \"11\", \"windspeedMiles\": \"7\" } ], \"request\": [ {\"query\": \"Richmond, United States Of America\", \"type\": \"City\" } ], \"weather\": [ {\"date\": \"2013-05-21\", \"precipMM\": \"3.4\", \"tempMaxC\": \"30\", \"tempMaxF\": \"86\", \"tempMinC\": \"21\", \"tempMinF\": \"70\", \"weatherCode\": \"356\", \"weatherDesc\": [ {\"value\": \"Moderate or heavy rain shower\" } ], \"weatherIconUrl\": [ {\"value\": \"http:\\/\\/www.worldweatheronline.com\\/images\\/wsymbols01_png_64\\/wsymbol_0010_heavy_rain_showers.png\" } ], \"winddir16Point\": \"SW\", \"winddirDegree\": \"220\", \"winddirection\": \"SW\", \"windspeedKmph\": \"22\", \"windspeedMiles\": \"14\" }, {\"date\": \"2013-05-22\", \"precipMM\": \"0.1\", \"tempMaxC\": \"30\", \"tempMaxF\": \"86\", \"tempMinC\": \"21\", \"tempMinF\": \"70\", \"weatherCode\": \"113\", \"weatherDesc\": [ {\"value\": \"Sunny\" } ], \"weatherIconUrl\": [ {\"value\": \"http:\\/\\/www.worldweatheronline.com\\/images\\/wsymbols01_png_64\\/wsymbol_0001_sunny.png\" } ], \"winddir16Point\": \"SW\", \"winddirDegree\": \"220\", \"winddirection\": \"SW\", \"windspeedKmph\": \"28\", \"windspeedMiles\": \"17\" }, {\"date\": \"2013-05-23\", \"precipMM\": \"10.3\", \"tempMaxC\": \"28\", \"tempMaxF\": \"83\", \"tempMinC\": \"17\", \"tempMinF\": \"63\", \"weatherCode\": \"356\", \"weatherDesc\": [ {\"value\": \"Moderate or heavy rain shower\" } ], \"weatherIconUrl\": [ {\"value\": \"http:\\/\\/www.worldweatheronline.com\\/images\\/wsymbols01_png_64\\/wsymbol_0010_heavy_rain_showers.png\" } ], \"winddir16Point\": \"SSW\", \"winddirDegree\": \"210\", \"winddirection\": \"SSW\", \"windspeedKmph\": \"26\", \"windspeedMiles\": \"16\" }, {\"date\": \"2013-05-24\", \"precipMM\": \"0.0\", \"tempMaxC\": \"23\", \"tempMaxF\": \"73\", \"tempMinC\": \"6\", \"tempMinF\": \"43\", \"weatherCode\": \"113\", \"weatherDesc\": [ {\"value\": \"Sunny\" } ], \"weatherIconUrl\": [ {\"value\": \"http:\\/\\/www.worldweatheronline.com\\/images\\/wsymbols01_png_64\\/wsymbol_0001_sunny.png\" } ], \"winddir16Point\": \"NNW\", \"winddirDegree\": \"337\", \"winddirection\": \"NNW\", \"windspeedKmph\": \"29\", \"windspeedMiles\": \"18\" } ] }}'
[execution_time] => 0.26597595214844
)
[6] => Array
(
[mysql_query] => SELECT *, ( 3959 * acos( cos( radians(37.624801) ) * cos( radians( merch_latitude ) ) * cos( radians( merch_longitude ) - radians(-77.496277) ) + sin( radians(37.624801) ) * sin( radians( merch_latitude ) ) ) ) AS distance
FROM merchants_local
HAVING distance < 10
ORDER BY distance
[execution_time] => 0.015059947967529
)
[7] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '126073' ORDER BY item_per_off
[execution_time] => 0.0083818435668945
)
[8] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '166640' ORDER BY item_per_off
[execution_time] => 0.01280403137207
)
[9] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '157661' ORDER BY item_per_off
[execution_time] => 0.012428998947144
)
[10] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '333931' ORDER BY item_per_off
[execution_time] => 0.0098059177398682
)
[11] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '258844' ORDER BY item_per_off
[execution_time] => 0.012603998184204
)
[12] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '271707' ORDER BY item_per_off
[execution_time] => 0.0095288753509521
)
[13] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '166601' ORDER BY item_per_off
[execution_time] => 0.012474060058594
)
[14] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '244612' ORDER BY item_per_off
[execution_time] => 0.012579917907715
)
[15] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '259743' ORDER BY item_per_off
[execution_time] => 0.01252007484436
)
[16] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '160601' ORDER BY item_per_off
[execution_time] => 0.0092799663543701
)
[17] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '279527' ORDER BY item_per_off
[execution_time] => 0.011220216751099
)
[18] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '339040' ORDER BY item_per_off
[execution_time] => 0.012295961380005
)
[19] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '258077' ORDER BY item_per_off
[execution_time] => 0.012270927429199
)
[20] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '165468' ORDER BY item_per_off
[execution_time] => 0.0092520713806152
)
[21] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '261396' ORDER BY item_per_off
[execution_time] => 0.0077519416809082
)
)
)
)