Array
(
[0] => Array
(
[api_query] => http://api.salecamel.com?api_key=123456789&do_get=local_locations
[execution_time] => 0.13238787651062
[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.047818899154663
)
)
)
[1] => Array
(
[api_query] => http://api.salecamel.com?api_key=123456789&do_get=get_local&location=Tewksbury%2C+MA%2C+US&radius=10&search_limit=15
[execution_time] => 7.4417631626129
[from_api] => Array
(
[0] => Array
(
[mysql_query] => SELECT merch_latitude, merch_longitude
FROM merchants_local
WHERE merch_locality='Tewksbury' AND merch_region='MA'
[execution_time] => 0.0057759284973145
)
[1] => Array
(
[news_api_call] => http://hyperlocal-api.outside.in/v1.1/states/MA/cities/Tewksbury/stories?dev_key=6at3bn2z23e33eu92utrq6pt&sig=fb5f96a0a1ea724658979a30c11e03fe&no-vertical=obituaries
)
[2] => Array
(
[mysql_query] => SELECT data FROM cache_news
WHERE locality = 'Tewksbury'
AND region = 'MA'
AND country = 'US'
AND expires > '1369232358'
[execution_time] => 0.00031685829162598
)
[3] => Array
(
[mysql_query] => INSERT INTO cache_news
(`locality`, `region`, `country`, `expires`, `data`)
VALUES
(
'Tewksbury',
'MA',
'US',
'1369235958',
'{\"links\":{\"last\":\"http://hyperlocal-api.outside.in/v1.1/states/MA/cities/Tewksbury/stories?no-vertical=obituaries&page=1&dev_key=6at3bn2z23e33eu92utrq6pt&sig=fb5f96a0a1ea724658979a30c11e03fe\",\"first\":\"http://hyperlocal-api.outside.in/v1.1/states/MA/cities/Tewksbury/stories?no-vertical=obituaries&page=1&dev_key=6at3bn2z23e33eu92utrq6pt&sig=fb5f96a0a1ea724658979a30c11e03fe\"},\"total\":0,\"location\":{\"display_name\":\"Tewksbury, MA\",\"state\":\"Massachusetts\",\"url\":\"http://outside.in/tewksbury-ma?utm_content=Tewksbury_MA&utm_source=API_OutsideIn_0&utm_medium=API&utm_campaign=APILinkback\",\"lng\":-71.22775268554688,\"lat\":42.61198043823242,\"uuid\":\"371dc4d5-42e1-4c16-8d1d-3611cfd11891\",\"city\":\"Tewksbury\",\"category\":{\"name\":\"city\",\"display_name\":\"City / Town / Village\"},\"state_abbrev\":\"MA\",\"url_name\":\"tewksbury-ma\",\"hot_for_requested\":false},\"stories\":[]}'
)
ON DUPLICATE KEY UPDATE expires = '1369235958', data = '{\"links\":{\"last\":\"http://hyperlocal-api.outside.in/v1.1/states/MA/cities/Tewksbury/stories?no-vertical=obituaries&page=1&dev_key=6at3bn2z23e33eu92utrq6pt&sig=fb5f96a0a1ea724658979a30c11e03fe\",\"first\":\"http://hyperlocal-api.outside.in/v1.1/states/MA/cities/Tewksbury/stories?no-vertical=obituaries&page=1&dev_key=6at3bn2z23e33eu92utrq6pt&sig=fb5f96a0a1ea724658979a30c11e03fe\"},\"total\":0,\"location\":{\"display_name\":\"Tewksbury, MA\",\"state\":\"Massachusetts\",\"url\":\"http://outside.in/tewksbury-ma?utm_content=Tewksbury_MA&utm_source=API_OutsideIn_0&utm_medium=API&utm_campaign=APILinkback\",\"lng\":-71.22775268554688,\"lat\":42.61198043823242,\"uuid\":\"371dc4d5-42e1-4c16-8d1d-3611cfd11891\",\"city\":\"Tewksbury\",\"category\":{\"name\":\"city\",\"display_name\":\"City / Town / Village\"},\"state_abbrev\":\"MA\",\"url_name\":\"tewksbury-ma\",\"hot_for_requested\":false},\"stories\":[]}'
[execution_time] => 0.067797183990479
)
[4] => Array
(
[mysql_query] => SELECT data FROM cache_weather
WHERE locality = 'Tewksbury'
AND region = 'MA'
AND country = 'US'
AND expires > '1369232358'
[execution_time] => 0.016775131225586
)
[5] => Array
(
[mysql_query] => INSERT INTO cache_weather
(`locality`, `region`, `country`, `expires`, `data`)
VALUES
(
'Tewksbury',
'MA',
'US',
'1369235958',
'{ \"data\": { \"current_condition\": [ {\"cloudcover\": \"100\", \"humidity\": \"88\", \"observation_time\": \"02:19 PM\", \"precipMM\": \"0.0\", \"pressure\": \"1013\", \"temp_C\": \"13\", \"temp_F\": \"55\", \"visibility\": \"16\", \"weatherCode\": \"122\", \"weatherDesc\": [ {\"value\": \"Overcast\" } ], \"weatherIconUrl\": [ {\"value\": \"http:\\/\\/www.worldweatheronline.com\\/images\\/wsymbols01_png_64\\/wsymbol_0004_black_low_cloud.png\" } ], \"winddir16Point\": \"ENE\", \"winddirDegree\": \"60\", \"windspeedKmph\": \"6\", \"windspeedMiles\": \"4\" } ], \"request\": [ {\"query\": \"Tewksbury, United States Of America\", \"type\": \"City\" } ], \"weather\": [ {\"date\": \"2013-05-22\", \"precipMM\": \"3.8\", \"tempMaxC\": \"19\", \"tempMaxF\": \"66\", \"tempMinC\": \"16\", \"tempMinF\": \"61\", \"weatherCode\": \"122\", \"weatherDesc\": [ {\"value\": \"Overcast\" } ], \"weatherIconUrl\": [ {\"value\": \"http:\\/\\/www.worldweatheronline.com\\/images\\/wsymbols01_png_64\\/wsymbol_0004_black_low_cloud.png\" } ], \"winddir16Point\": \"S\", \"winddirDegree\": \"170\", \"winddirection\": \"S\", \"windspeedKmph\": \"13\", \"windspeedMiles\": \"8\" }, {\"date\": \"2013-05-23\", \"precipMM\": \"0.3\", \"tempMaxC\": \"23\", \"tempMaxF\": \"74\", \"tempMinC\": \"17\", \"tempMinF\": \"62\", \"weatherCode\": \"122\", \"weatherDesc\": [ {\"value\": \"Overcast\" } ], \"weatherIconUrl\": [ {\"value\": \"http:\\/\\/www.worldweatheronline.com\\/images\\/wsymbols01_png_64\\/wsymbol_0004_black_low_cloud.png\" } ], \"winddir16Point\": \"SSW\", \"winddirDegree\": \"210\", \"winddirection\": \"SSW\", \"windspeedKmph\": \"26\", \"windspeedMiles\": \"16\" }, {\"date\": \"2013-05-24\", \"precipMM\": \"46.7\", \"tempMaxC\": \"22\", \"tempMaxF\": \"72\", \"tempMinC\": \"10\", \"tempMinF\": \"50\", \"weatherCode\": \"143\", \"weatherDesc\": [ {\"value\": \"Mist\" } ], \"weatherIconUrl\": [ {\"value\": \"http:\\/\\/www.worldweatheronline.com\\/images\\/wsymbols01_png_64\\/wsymbol_0006_mist.png\" } ], \"winddir16Point\": \"NW\", \"winddirDegree\": \"320\", \"winddirection\": \"NW\", \"windspeedKmph\": \"21\", \"windspeedMiles\": \"13\" }, {\"date\": \"2013-05-25\", \"precipMM\": \"4.0\", \"tempMaxC\": \"11\", \"tempMaxF\": \"52\", \"tempMinC\": \"5\", \"tempMinF\": \"41\", \"weatherCode\": \"266\", \"weatherDesc\": [ {\"value\": \"Light drizzle\" } ], \"weatherIconUrl\": [ {\"value\": \"http:\\/\\/www.worldweatheronline.com\\/images\\/wsymbols01_png_64\\/wsymbol_0017_cloudy_with_light_rain.png\" } ], \"winddir16Point\": \"N\", \"winddirDegree\": \"359\", \"winddirection\": \"N\", \"windspeedKmph\": \"19\", \"windspeedMiles\": \"12\" } ] }}'
)
ON DUPLICATE KEY UPDATE expires = '1369235958', data = '{ \"data\": { \"current_condition\": [ {\"cloudcover\": \"100\", \"humidity\": \"88\", \"observation_time\": \"02:19 PM\", \"precipMM\": \"0.0\", \"pressure\": \"1013\", \"temp_C\": \"13\", \"temp_F\": \"55\", \"visibility\": \"16\", \"weatherCode\": \"122\", \"weatherDesc\": [ {\"value\": \"Overcast\" } ], \"weatherIconUrl\": [ {\"value\": \"http:\\/\\/www.worldweatheronline.com\\/images\\/wsymbols01_png_64\\/wsymbol_0004_black_low_cloud.png\" } ], \"winddir16Point\": \"ENE\", \"winddirDegree\": \"60\", \"windspeedKmph\": \"6\", \"windspeedMiles\": \"4\" } ], \"request\": [ {\"query\": \"Tewksbury, United States Of America\", \"type\": \"City\" } ], \"weather\": [ {\"date\": \"2013-05-22\", \"precipMM\": \"3.8\", \"tempMaxC\": \"19\", \"tempMaxF\": \"66\", \"tempMinC\": \"16\", \"tempMinF\": \"61\", \"weatherCode\": \"122\", \"weatherDesc\": [ {\"value\": \"Overcast\" } ], \"weatherIconUrl\": [ {\"value\": \"http:\\/\\/www.worldweatheronline.com\\/images\\/wsymbols01_png_64\\/wsymbol_0004_black_low_cloud.png\" } ], \"winddir16Point\": \"S\", \"winddirDegree\": \"170\", \"winddirection\": \"S\", \"windspeedKmph\": \"13\", \"windspeedMiles\": \"8\" }, {\"date\": \"2013-05-23\", \"precipMM\": \"0.3\", \"tempMaxC\": \"23\", \"tempMaxF\": \"74\", \"tempMinC\": \"17\", \"tempMinF\": \"62\", \"weatherCode\": \"122\", \"weatherDesc\": [ {\"value\": \"Overcast\" } ], \"weatherIconUrl\": [ {\"value\": \"http:\\/\\/www.worldweatheronline.com\\/images\\/wsymbols01_png_64\\/wsymbol_0004_black_low_cloud.png\" } ], \"winddir16Point\": \"SSW\", \"winddirDegree\": \"210\", \"winddirection\": \"SSW\", \"windspeedKmph\": \"26\", \"windspeedMiles\": \"16\" }, {\"date\": \"2013-05-24\", \"precipMM\": \"46.7\", \"tempMaxC\": \"22\", \"tempMaxF\": \"72\", \"tempMinC\": \"10\", \"tempMinF\": \"50\", \"weatherCode\": \"143\", \"weatherDesc\": [ {\"value\": \"Mist\" } ], \"weatherIconUrl\": [ {\"value\": \"http:\\/\\/www.worldweatheronline.com\\/images\\/wsymbols01_png_64\\/wsymbol_0006_mist.png\" } ], \"winddir16Point\": \"NW\", \"winddirDegree\": \"320\", \"winddirection\": \"NW\", \"windspeedKmph\": \"21\", \"windspeedMiles\": \"13\" }, {\"date\": \"2013-05-25\", \"precipMM\": \"4.0\", \"tempMaxC\": \"11\", \"tempMaxF\": \"52\", \"tempMinC\": \"5\", \"tempMinF\": \"41\", \"weatherCode\": \"266\", \"weatherDesc\": [ {\"value\": \"Light drizzle\" } ], \"weatherIconUrl\": [ {\"value\": \"http:\\/\\/www.worldweatheronline.com\\/images\\/wsymbols01_png_64\\/wsymbol_0017_cloudy_with_light_rain.png\" } ], \"winddir16Point\": \"N\", \"winddirDegree\": \"359\", \"winddirection\": \"N\", \"windspeedKmph\": \"19\", \"windspeedMiles\": \"12\" } ] }}'
[execution_time] => 0.064081192016602
)
[6] => Array
(
[mysql_query] => SELECT *, ( 3959 * acos( cos( radians(42.620033) ) * cos( radians( merch_latitude ) ) * cos( radians( merch_longitude ) - radians(-71.184158) ) + sin( radians(42.620033) ) * sin( radians( merch_latitude ) ) ) ) AS distance
FROM merchants_local
HAVING distance < 10
ORDER BY distance
[execution_time] => 0.019291877746582
)
[7] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '136763' ORDER BY item_per_off
[execution_time] => 0.0073189735412598
)
[8] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '338720' ORDER BY item_per_off
[execution_time] => 0.016986131668091
)
[9] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '190128' ORDER BY item_per_off
[execution_time] => 0.0072610378265381
)
[10] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '262913' ORDER BY item_per_off
[execution_time] => 0.011931896209717
)
[11] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '284796' ORDER BY item_per_off
[execution_time] => 0.013214111328125
)
[12] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '257809' ORDER BY item_per_off
[execution_time] => 0.012097835540771
)
[13] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '190145' ORDER BY item_per_off
[execution_time] => 0.011855125427246
)
[14] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '128987' ORDER BY item_per_off
[execution_time] => 0.011934041976929
)
[15] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '163731' ORDER BY item_per_off
[execution_time] => 0.012032032012939
)
[16] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '278886' ORDER BY item_per_off
[execution_time] => 0.011453866958618
)
[17] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '127753' ORDER BY item_per_off
[execution_time] => 0.012115001678467
)
[18] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '258618' ORDER BY item_per_off
[execution_time] => 0.010993957519531
)
[19] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '339047' ORDER BY item_per_off
[execution_time] => 0.011868953704834
)
[20] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '129974' ORDER BY item_per_off
[execution_time] => 0.012037992477417
)
[21] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '260831' ORDER BY item_per_off
[execution_time] => 0.011882066726685
)
)
)
)