Array
(
[0] => Array
(
[api_query] => http://api.salecamel.com?api_key=123456789&do_get=local_locations
[execution_time] => 0.13817811012268
[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.05137300491333
)
)
)
[1] => Array
(
[api_query] => http://api.salecamel.com?api_key=123456789&do_get=get_local&location=Amityville%2C+NY%2C+US&radius=10&search_limit=15
[execution_time] => 8.8525578975677
[from_api] => Array
(
[0] => Array
(
[mysql_query] => SELECT merch_latitude, merch_longitude
FROM merchants_local
WHERE merch_locality='Amityville' AND merch_region='NY'
[execution_time] => 0.007357120513916
)
[1] => Array
(
[news_api_call] => http://hyperlocal-api.outside.in/v1.1/states/NY/cities/Amityville/stories?dev_key=6at3bn2z23e33eu92utrq6pt&sig=6437f9a88560e40769aa1eb7fcbb7ce6&no-vertical=obituaries
)
[2] => Array
(
[mysql_query] => SELECT data FROM cache_news
WHERE locality = 'Amityville'
AND region = 'NY'
AND country = 'US'
AND expires > '1369196496'
[execution_time] => 0.00033807754516602
)
[3] => Array
(
[mysql_query] => INSERT INTO cache_news
(`locality`, `region`, `country`, `expires`, `data`)
VALUES
(
'Amityville',
'NY',
'US',
'1369200096',
'{\"links\":{\"last\":\"http://hyperlocal-api.outside.in/v1.1/states/NY/cities/Amityville/stories?no-vertical=obituaries&page=1&dev_key=6at3bn2z23e33eu92utrq6pt&sig=6437f9a88560e40769aa1eb7fcbb7ce6\",\"first\":\"http://hyperlocal-api.outside.in/v1.1/states/NY/cities/Amityville/stories?no-vertical=obituaries&page=1&dev_key=6at3bn2z23e33eu92utrq6pt&sig=6437f9a88560e40769aa1eb7fcbb7ce6\"},\"total\":0,\"location\":{\"display_name\":\"Amityville, NY\",\"state\":\"New York\",\"url\":\"http://outside.in/amityville-ny?utm_content=Amityville_NY&utm_source=API_OutsideIn_0&utm_medium=API&utm_campaign=APILinkback\",\"lng\":-73.41554260253906,\"lat\":40.669639587402344,\"uuid\":\"ced38fc3-5f02-4510-9573-041d4e776d01\",\"city\":\"Amityville\",\"category\":{\"name\":\"city\",\"display_name\":\"City / Town / Village\"},\"state_abbrev\":\"NY\",\"url_name\":\"amityville-ny\",\"hot_for_requested\":false},\"stories\":[]}'
)
ON DUPLICATE KEY UPDATE expires = '1369200096', data = '{\"links\":{\"last\":\"http://hyperlocal-api.outside.in/v1.1/states/NY/cities/Amityville/stories?no-vertical=obituaries&page=1&dev_key=6at3bn2z23e33eu92utrq6pt&sig=6437f9a88560e40769aa1eb7fcbb7ce6\",\"first\":\"http://hyperlocal-api.outside.in/v1.1/states/NY/cities/Amityville/stories?no-vertical=obituaries&page=1&dev_key=6at3bn2z23e33eu92utrq6pt&sig=6437f9a88560e40769aa1eb7fcbb7ce6\"},\"total\":0,\"location\":{\"display_name\":\"Amityville, NY\",\"state\":\"New York\",\"url\":\"http://outside.in/amityville-ny?utm_content=Amityville_NY&utm_source=API_OutsideIn_0&utm_medium=API&utm_campaign=APILinkback\",\"lng\":-73.41554260253906,\"lat\":40.669639587402344,\"uuid\":\"ced38fc3-5f02-4510-9573-041d4e776d01\",\"city\":\"Amityville\",\"category\":{\"name\":\"city\",\"display_name\":\"City / Town / Village\"},\"state_abbrev\":\"NY\",\"url_name\":\"amityville-ny\",\"hot_for_requested\":false},\"stories\":[]}'
[execution_time] => 0.29540491104126
)
[4] => Array
(
[mysql_query] => SELECT data FROM cache_weather
WHERE locality = 'Amityville'
AND region = 'NY'
AND country = 'US'
AND expires > '1369196496'
[execution_time] => 0.00058102607727051
)
[5] => Array
(
[mysql_query] => INSERT INTO cache_weather
(`locality`, `region`, `country`, `expires`, `data`)
VALUES
(
'Amityville',
'NY',
'US',
'1369200096',
'{ \"data\": { \"current_condition\": [ {\"cloudcover\": \"0\", \"humidity\": \"88\", \"observation_time\": \"04:21 AM\", \"precipMM\": \"0.0\", \"pressure\": \"1012\", \"temp_C\": \"18\", \"temp_F\": \"64\", \"visibility\": \"14\", \"weatherCode\": \"113\", \"weatherDesc\": [ {\"value\": \"Clear\" } ], \"weatherIconUrl\": [ {\"value\": \"http:\\/\\/www.worldweatheronline.com\\/images\\/wsymbols01_png_64\\/wsymbol_0008_clear_sky_night.png\" } ], \"winddir16Point\": \"SSW\", \"winddirDegree\": \"200\", \"windspeedKmph\": \"11\", \"windspeedMiles\": \"7\" } ], \"request\": [ {\"query\": \"Amityville, United States Of America\", \"type\": \"City\" } ], \"weather\": [ {\"date\": \"2013-05-22\", \"precipMM\": \"1.1\", \"tempMaxC\": \"26\", \"tempMaxF\": \"79\", \"tempMinC\": \"18\", \"tempMinF\": \"65\", \"weatherCode\": \"113\", \"weatherDesc\": [ {\"value\": \"Sunny\" } ], \"weatherIconUrl\": [ {\"value\": \"http:\\/\\/www.worldweatheronline.com\\/images\\/wsymbols01_png_64\\/wsymbol_0001_sunny.png\" } ], \"winddir16Point\": \"S\", \"winddirDegree\": \"180\", \"winddirection\": \"S\", \"windspeedKmph\": \"26\", \"windspeedMiles\": \"16\" }, {\"date\": \"2013-05-23\", \"precipMM\": \"8.5\", \"tempMaxC\": \"23\", \"tempMaxF\": \"73\", \"tempMinC\": \"19\", \"tempMinF\": \"66\", \"weatherCode\": \"176\", \"weatherDesc\": [ {\"value\": \"Patchy rain nearby\" } ], \"weatherIconUrl\": [ {\"value\": \"http:\\/\\/www.worldweatheronline.com\\/images\\/wsymbols01_png_64\\/wsymbol_0009_light_rain_showers.png\" } ], \"winddir16Point\": \"S\", \"winddirDegree\": \"190\", \"winddirection\": \"S\", \"windspeedKmph\": \"26\", \"windspeedMiles\": \"16\" }, {\"date\": \"2013-05-24\", \"precipMM\": \"8.5\", \"tempMaxC\": \"21\", \"tempMaxF\": \"70\", \"tempMinC\": \"11\", \"tempMinF\": \"52\", \"weatherCode\": \"122\", \"weatherDesc\": [ {\"value\": \"Overcast\" } ], \"weatherIconUrl\": [ {\"value\": \"http:\\/\\/www.worldweatheronline.com\\/images\\/wsymbols01_png_64\\/wsymbol_0004_black_low_cloud.png\" } ], \"winddir16Point\": \"S\", \"winddirDegree\": \"190\", \"winddirection\": \"S\", \"windspeedKmph\": \"31\", \"windspeedMiles\": \"19\" }, {\"date\": \"2013-05-25\", \"precipMM\": \"1.3\", \"tempMaxC\": \"18\", \"tempMaxF\": \"65\", \"tempMinC\": \"9\", \"tempMinF\": \"49\", \"weatherCode\": \"113\", \"weatherDesc\": [ {\"value\": \"Sunny\" } ], \"weatherIconUrl\": [ {\"value\": \"http:\\/\\/www.worldweatheronline.com\\/images\\/wsymbols01_png_64\\/wsymbol_0001_sunny.png\" } ], \"winddir16Point\": \"W\", \"winddirDegree\": \"260\", \"winddirection\": \"W\", \"windspeedKmph\": \"34\", \"windspeedMiles\": \"21\" } ] }}'
)
ON DUPLICATE KEY UPDATE expires = '1369200096', data = '{ \"data\": { \"current_condition\": [ {\"cloudcover\": \"0\", \"humidity\": \"88\", \"observation_time\": \"04:21 AM\", \"precipMM\": \"0.0\", \"pressure\": \"1012\", \"temp_C\": \"18\", \"temp_F\": \"64\", \"visibility\": \"14\", \"weatherCode\": \"113\", \"weatherDesc\": [ {\"value\": \"Clear\" } ], \"weatherIconUrl\": [ {\"value\": \"http:\\/\\/www.worldweatheronline.com\\/images\\/wsymbols01_png_64\\/wsymbol_0008_clear_sky_night.png\" } ], \"winddir16Point\": \"SSW\", \"winddirDegree\": \"200\", \"windspeedKmph\": \"11\", \"windspeedMiles\": \"7\" } ], \"request\": [ {\"query\": \"Amityville, United States Of America\", \"type\": \"City\" } ], \"weather\": [ {\"date\": \"2013-05-22\", \"precipMM\": \"1.1\", \"tempMaxC\": \"26\", \"tempMaxF\": \"79\", \"tempMinC\": \"18\", \"tempMinF\": \"65\", \"weatherCode\": \"113\", \"weatherDesc\": [ {\"value\": \"Sunny\" } ], \"weatherIconUrl\": [ {\"value\": \"http:\\/\\/www.worldweatheronline.com\\/images\\/wsymbols01_png_64\\/wsymbol_0001_sunny.png\" } ], \"winddir16Point\": \"S\", \"winddirDegree\": \"180\", \"winddirection\": \"S\", \"windspeedKmph\": \"26\", \"windspeedMiles\": \"16\" }, {\"date\": \"2013-05-23\", \"precipMM\": \"8.5\", \"tempMaxC\": \"23\", \"tempMaxF\": \"73\", \"tempMinC\": \"19\", \"tempMinF\": \"66\", \"weatherCode\": \"176\", \"weatherDesc\": [ {\"value\": \"Patchy rain nearby\" } ], \"weatherIconUrl\": [ {\"value\": \"http:\\/\\/www.worldweatheronline.com\\/images\\/wsymbols01_png_64\\/wsymbol_0009_light_rain_showers.png\" } ], \"winddir16Point\": \"S\", \"winddirDegree\": \"190\", \"winddirection\": \"S\", \"windspeedKmph\": \"26\", \"windspeedMiles\": \"16\" }, {\"date\": \"2013-05-24\", \"precipMM\": \"8.5\", \"tempMaxC\": \"21\", \"tempMaxF\": \"70\", \"tempMinC\": \"11\", \"tempMinF\": \"52\", \"weatherCode\": \"122\", \"weatherDesc\": [ {\"value\": \"Overcast\" } ], \"weatherIconUrl\": [ {\"value\": \"http:\\/\\/www.worldweatheronline.com\\/images\\/wsymbols01_png_64\\/wsymbol_0004_black_low_cloud.png\" } ], \"winddir16Point\": \"S\", \"winddirDegree\": \"190\", \"winddirection\": \"S\", \"windspeedKmph\": \"31\", \"windspeedMiles\": \"19\" }, {\"date\": \"2013-05-25\", \"precipMM\": \"1.3\", \"tempMaxC\": \"18\", \"tempMaxF\": \"65\", \"tempMinC\": \"9\", \"tempMinF\": \"49\", \"weatherCode\": \"113\", \"weatherDesc\": [ {\"value\": \"Sunny\" } ], \"weatherIconUrl\": [ {\"value\": \"http:\\/\\/www.worldweatheronline.com\\/images\\/wsymbols01_png_64\\/wsymbol_0001_sunny.png\" } ], \"winddir16Point\": \"W\", \"winddirDegree\": \"260\", \"winddirection\": \"W\", \"windspeedKmph\": \"34\", \"windspeedMiles\": \"21\" } ] }}'
[execution_time] => 0.28236103057861
)
[6] => Array
(
[mysql_query] => SELECT *, ( 3959 * acos( cos( radians(40.686293) ) * cos( radians( merch_latitude ) ) * cos( radians( merch_longitude ) - radians(-73.412179) ) + sin( radians(40.686293) ) * sin( radians( merch_latitude ) ) ) ) AS distance
FROM merchants_local
HAVING distance < 10
ORDER BY distance
[execution_time] => 0.020531892776489
)
[7] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '164872' ORDER BY item_per_off
[execution_time] => 0.011512041091919
)
[8] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '128374' ORDER BY item_per_off
[execution_time] => 0.010219097137451
)
[9] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '327244' ORDER BY item_per_off
[execution_time] => 0.0072269439697266
)
[10] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '162922' ORDER BY item_per_off
[execution_time] => 0.0071988105773926
)
[11] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '169390' ORDER BY item_per_off
[execution_time] => 0.007194995880127
)
[12] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '259195' ORDER BY item_per_off
[execution_time] => 0.0072290897369385
)
[13] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '128641' ORDER BY item_per_off
[execution_time] => 0.0072028636932373
)
[14] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '260994' ORDER BY item_per_off
[execution_time] => 0.014975070953369
)
[15] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '272189' ORDER BY item_per_off
[execution_time] => 0.0075430870056152
)
[16] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '126435' ORDER BY item_per_off
[execution_time] => 0.012205123901367
)
[17] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '144321' ORDER BY item_per_off
[execution_time] => 0.0075380802154541
)
[18] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '165894' ORDER BY item_per_off
[execution_time] => 0.0075318813323975
)
[19] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '258365' ORDER BY item_per_off
[execution_time] => 0.0075509548187256
)
[20] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '266553' ORDER BY item_per_off
[execution_time] => 0.0075259208679199
)
[21] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '333894' ORDER BY item_per_off
[execution_time] => 0.0075211524963379
)
[22] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '338191' ORDER BY item_per_off
[execution_time] => 0.0074300765991211
)
[23] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '161815' ORDER BY item_per_off
[execution_time] => 0.0074710845947266
)
[24] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '166622' ORDER BY item_per_off
[execution_time] => 0.0072810649871826
)
[25] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '259074' ORDER BY item_per_off
[execution_time] => 0.0072579383850098
)
[26] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '161935' ORDER BY item_per_off
[execution_time] => 0.0072529315948486
)
[27] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '166380' ORDER BY item_per_off
[execution_time] => 0.007249116897583
)
[28] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '127601' ORDER BY item_per_off
[execution_time] => 0.0072929859161377
)
[29] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '129856' ORDER BY item_per_off
[execution_time] => 0.0072460174560547
)
[30] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '134390' ORDER BY item_per_off
[execution_time] => 0.0072619915008545
)
[31] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '259219' ORDER BY item_per_off
[execution_time] => 0.0072319507598877
)
[32] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '325755' ORDER BY item_per_off
[execution_time] => 0.0072479248046875
)
[33] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '122295' ORDER BY item_per_off
[execution_time] => 0.0072100162506104
)
[34] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '262808' ORDER BY item_per_off
[execution_time] => 0.0072600841522217
)
)
)
)