Array
(
[0] => Array
(
[api_query] => http://api.salecamel.com?api_key=123456789&do_get=local_locations
[execution_time] => 0.13400197029114
[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.04925799369812
)
)
)
[1] => Array
(
[api_query] => http://api.salecamel.com?api_key=123456789&do_get=get_local&location=Birmingham%2C+AL%2C+US&radius=10&search_limit=15
[execution_time] => 9.0398650169373
[from_api] => Array
(
[0] => Array
(
[mysql_query] => SELECT merch_latitude, merch_longitude
FROM merchants_local
WHERE merch_locality='Birmingham' AND merch_region='AL'
[execution_time] => 0.0073299407958984
)
[1] => Array
(
[news_api_call] => http://hyperlocal-api.outside.in/v1.1/states/AL/cities/Birmingham/stories?dev_key=6at3bn2z23e33eu92utrq6pt&sig=661d2aea6708d1f754cf43ad2423c65a&no-vertical=obituaries
)
[2] => Array
(
[mysql_query] => SELECT data FROM cache_news
WHERE locality = 'Birmingham'
AND region = 'AL'
AND country = 'US'
AND expires > '1368910011'
[execution_time] => 0.00017213821411133
)
[3] => Array
(
[mysql_query] => INSERT INTO cache_news
(`locality`, `region`, `country`, `expires`, `data`)
VALUES
(
'Birmingham',
'AL',
'US',
'1368913611',
'{\"links\":{\"last\":\"http://hyperlocal-api.outside.in/v1.1/states/AL/cities/Birmingham/stories?no-vertical=obituaries&page=1&dev_key=6at3bn2z23e33eu92utrq6pt&sig=661d2aea6708d1f754cf43ad2423c65a\",\"first\":\"http://hyperlocal-api.outside.in/v1.1/states/AL/cities/Birmingham/stories?no-vertical=obituaries&page=1&dev_key=6at3bn2z23e33eu92utrq6pt&sig=661d2aea6708d1f754cf43ad2423c65a\"},\"total\":0,\"location\":{\"display_name\":\"Birmingham, AL\",\"state\":\"Alabama\",\"url\":\"http://outside.in/birmingham-al?utm_content=Birmingham_AL&utm_source=API_OutsideIn_0&utm_medium=API&utm_campaign=APILinkback\",\"lng\":-86.79425811767578,\"lat\":33.52765655517578,\"uuid\":\"aa858e91-c1b9-406f-88bb-44f950ef7703\",\"city\":\"Birmingham\",\"category\":{\"name\":\"city\",\"display_name\":\"City / Town / Village\"},\"state_abbrev\":\"AL\",\"url_name\":\"birmingham-al\",\"hot_for_requested\":false},\"stories\":[]}'
)
ON DUPLICATE KEY UPDATE expires = '1368913611', data = '{\"links\":{\"last\":\"http://hyperlocal-api.outside.in/v1.1/states/AL/cities/Birmingham/stories?no-vertical=obituaries&page=1&dev_key=6at3bn2z23e33eu92utrq6pt&sig=661d2aea6708d1f754cf43ad2423c65a\",\"first\":\"http://hyperlocal-api.outside.in/v1.1/states/AL/cities/Birmingham/stories?no-vertical=obituaries&page=1&dev_key=6at3bn2z23e33eu92utrq6pt&sig=661d2aea6708d1f754cf43ad2423c65a\"},\"total\":0,\"location\":{\"display_name\":\"Birmingham, AL\",\"state\":\"Alabama\",\"url\":\"http://outside.in/birmingham-al?utm_content=Birmingham_AL&utm_source=API_OutsideIn_0&utm_medium=API&utm_campaign=APILinkback\",\"lng\":-86.79425811767578,\"lat\":33.52765655517578,\"uuid\":\"aa858e91-c1b9-406f-88bb-44f950ef7703\",\"city\":\"Birmingham\",\"category\":{\"name\":\"city\",\"display_name\":\"City / Town / Village\"},\"state_abbrev\":\"AL\",\"url_name\":\"birmingham-al\",\"hot_for_requested\":false},\"stories\":[]}'
[execution_time] => 0.14334392547607
)
[4] => Array
(
[mysql_query] => SELECT data FROM cache_weather
WHERE locality = 'Birmingham'
AND region = 'AL'
AND country = 'US'
AND expires > '1368910011'
[execution_time] => 0.00051498413085938
)
[5] => Array
(
[mysql_query] => INSERT INTO cache_weather
(`locality`, `region`, `country`, `expires`, `data`)
VALUES
(
'Birmingham',
'AL',
'US',
'1368913611',
'{ \"data\": { \"current_condition\": [ {\"cloudcover\": \"75\", \"humidity\": \"66\", \"observation_time\": \"08:46 PM\", \"precipMM\": \"0.4\", \"pressure\": \"1017\", \"temp_C\": \"27\", \"temp_F\": \"81\", \"visibility\": \"16\", \"weatherCode\": \"116\", \"weatherDesc\": [ {\"value\": \"Partly Cloudy\" } ], \"weatherIconUrl\": [ {\"value\": \"http:\\/\\/www.worldweatheronline.com\\/images\\/wsymbols01_png_64\\/wsymbol_0002_sunny_intervals.png\" } ], \"winddir16Point\": \"WSW\", \"winddirDegree\": \"240\", \"windspeedKmph\": \"15\", \"windspeedMiles\": \"9\" } ], \"request\": [ {\"query\": \"Birmingham, United States Of America\", \"type\": \"City\" } ], \"weather\": [ {\"date\": \"2013-05-18\", \"precipMM\": \"4.0\", \"tempMaxC\": \"27\", \"tempMaxF\": \"80\", \"tempMinC\": \"21\", \"tempMinF\": \"70\", \"weatherCode\": \"176\", \"weatherDesc\": [ {\"value\": \"Patchy rain nearby\" } ], \"weatherIconUrl\": [ {\"value\": \"http:\\/\\/www.worldweatheronline.com\\/images\\/wsymbols01_png_64\\/wsymbol_0009_light_rain_showers.png\" } ], \"winddir16Point\": \"WSW\", \"winddirDegree\": \"240\", \"winddirection\": \"WSW\", \"windspeedKmph\": \"21\", \"windspeedMiles\": \"13\" }, {\"date\": \"2013-05-19\", \"precipMM\": \"0.4\", \"tempMaxC\": \"29\", \"tempMaxF\": \"84\", \"tempMinC\": \"21\", \"tempMinF\": \"70\", \"weatherCode\": \"113\", \"weatherDesc\": [ {\"value\": \"Sunny\" } ], \"weatherIconUrl\": [ {\"value\": \"http:\\/\\/www.worldweatheronline.com\\/images\\/wsymbols01_png_64\\/wsymbol_0001_sunny.png\" } ], \"winddir16Point\": \"SSW\", \"winddirDegree\": \"210\", \"winddirection\": \"SSW\", \"windspeedKmph\": \"13\", \"windspeedMiles\": \"8\" }, {\"date\": \"2013-05-20\", \"precipMM\": \"0.0\", \"tempMaxC\": \"29\", \"tempMaxF\": \"85\", \"tempMinC\": \"19\", \"tempMinF\": \"66\", \"weatherCode\": \"113\", \"weatherDesc\": [ {\"value\": \"Sunny\" } ], \"weatherIconUrl\": [ {\"value\": \"http:\\/\\/www.worldweatheronline.com\\/images\\/wsymbols01_png_64\\/wsymbol_0001_sunny.png\" } ], \"winddir16Point\": \"SSW\", \"winddirDegree\": \"210\", \"winddirection\": \"SSW\", \"windspeedKmph\": \"11\", \"windspeedMiles\": \"7\" }, {\"date\": \"2013-05-21\", \"precipMM\": \"0.0\", \"tempMaxC\": \"29\", \"tempMaxF\": \"84\", \"tempMinC\": \"19\", \"tempMinF\": \"66\", \"weatherCode\": \"113\", \"weatherDesc\": [ {\"value\": \"Sunny\" } ], \"weatherIconUrl\": [ {\"value\": \"http:\\/\\/www.worldweatheronline.com\\/images\\/wsymbols01_png_64\\/wsymbol_0001_sunny.png\" } ], \"winddir16Point\": \"S\", \"winddirDegree\": \"181\", \"winddirection\": \"S\", \"windspeedKmph\": \"19\", \"windspeedMiles\": \"12\" } ] }}'
)
ON DUPLICATE KEY UPDATE expires = '1368913611', data = '{ \"data\": { \"current_condition\": [ {\"cloudcover\": \"75\", \"humidity\": \"66\", \"observation_time\": \"08:46 PM\", \"precipMM\": \"0.4\", \"pressure\": \"1017\", \"temp_C\": \"27\", \"temp_F\": \"81\", \"visibility\": \"16\", \"weatherCode\": \"116\", \"weatherDesc\": [ {\"value\": \"Partly Cloudy\" } ], \"weatherIconUrl\": [ {\"value\": \"http:\\/\\/www.worldweatheronline.com\\/images\\/wsymbols01_png_64\\/wsymbol_0002_sunny_intervals.png\" } ], \"winddir16Point\": \"WSW\", \"winddirDegree\": \"240\", \"windspeedKmph\": \"15\", \"windspeedMiles\": \"9\" } ], \"request\": [ {\"query\": \"Birmingham, United States Of America\", \"type\": \"City\" } ], \"weather\": [ {\"date\": \"2013-05-18\", \"precipMM\": \"4.0\", \"tempMaxC\": \"27\", \"tempMaxF\": \"80\", \"tempMinC\": \"21\", \"tempMinF\": \"70\", \"weatherCode\": \"176\", \"weatherDesc\": [ {\"value\": \"Patchy rain nearby\" } ], \"weatherIconUrl\": [ {\"value\": \"http:\\/\\/www.worldweatheronline.com\\/images\\/wsymbols01_png_64\\/wsymbol_0009_light_rain_showers.png\" } ], \"winddir16Point\": \"WSW\", \"winddirDegree\": \"240\", \"winddirection\": \"WSW\", \"windspeedKmph\": \"21\", \"windspeedMiles\": \"13\" }, {\"date\": \"2013-05-19\", \"precipMM\": \"0.4\", \"tempMaxC\": \"29\", \"tempMaxF\": \"84\", \"tempMinC\": \"21\", \"tempMinF\": \"70\", \"weatherCode\": \"113\", \"weatherDesc\": [ {\"value\": \"Sunny\" } ], \"weatherIconUrl\": [ {\"value\": \"http:\\/\\/www.worldweatheronline.com\\/images\\/wsymbols01_png_64\\/wsymbol_0001_sunny.png\" } ], \"winddir16Point\": \"SSW\", \"winddirDegree\": \"210\", \"winddirection\": \"SSW\", \"windspeedKmph\": \"13\", \"windspeedMiles\": \"8\" }, {\"date\": \"2013-05-20\", \"precipMM\": \"0.0\", \"tempMaxC\": \"29\", \"tempMaxF\": \"85\", \"tempMinC\": \"19\", \"tempMinF\": \"66\", \"weatherCode\": \"113\", \"weatherDesc\": [ {\"value\": \"Sunny\" } ], \"weatherIconUrl\": [ {\"value\": \"http:\\/\\/www.worldweatheronline.com\\/images\\/wsymbols01_png_64\\/wsymbol_0001_sunny.png\" } ], \"winddir16Point\": \"SSW\", \"winddirDegree\": \"210\", \"winddirection\": \"SSW\", \"windspeedKmph\": \"11\", \"windspeedMiles\": \"7\" }, {\"date\": \"2013-05-21\", \"precipMM\": \"0.0\", \"tempMaxC\": \"29\", \"tempMaxF\": \"84\", \"tempMinC\": \"19\", \"tempMinF\": \"66\", \"weatherCode\": \"113\", \"weatherDesc\": [ {\"value\": \"Sunny\" } ], \"weatherIconUrl\": [ {\"value\": \"http:\\/\\/www.worldweatheronline.com\\/images\\/wsymbols01_png_64\\/wsymbol_0001_sunny.png\" } ], \"winddir16Point\": \"S\", \"winddirDegree\": \"181\", \"winddirection\": \"S\", \"windspeedKmph\": \"19\", \"windspeedMiles\": \"12\" } ] }}'
[execution_time] => 0.26918292045593
)
[6] => Array
(
[mysql_query] => SELECT *, ( 3959 * acos( cos( radians(33.499531) ) * cos( radians( merch_latitude ) ) * cos( radians( merch_longitude ) - radians(-86.795342) ) + sin( radians(33.499531) ) * sin( radians( merch_latitude ) ) ) ) AS distance
FROM merchants_local
HAVING distance < 10
ORDER BY distance
[execution_time] => 0.016706943511963
)
[7] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '123036' ORDER BY item_per_off
[execution_time] => 0.0070281028747559
)
[8] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '261957' ORDER BY item_per_off
[execution_time] => 0.0095150470733643
)
[9] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '166686' ORDER BY item_per_off
[execution_time] => 0.011190891265869
)
[10] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '125270' ORDER BY item_per_off
[execution_time] => 0.017971992492676
)
[11] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '268456' ORDER BY item_per_off
[execution_time] => 0.011106967926025
)
[12] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '125330' ORDER BY item_per_off
[execution_time] => 0.011054039001465
)
[13] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '335082' ORDER BY item_per_off
[execution_time] => 0.0088698863983154
)
[14] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '283876' ORDER BY item_per_off
[execution_time] => 0.011194944381714
)
[15] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '335930' ORDER BY item_per_off
[execution_time] => 0.0088961124420166
)
[16] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '129226' ORDER BY item_per_off
[execution_time] => 0.011989831924438
)
[17] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '131435' ORDER BY item_per_off
[execution_time] => 0.011140108108521
)
[18] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '302464' ORDER BY item_per_off
[execution_time] => 0.011122941970825
)
[19] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '75594' ORDER BY item_per_off
[execution_time] => 0.010651826858521
)
[20] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '166799' ORDER BY item_per_off
[execution_time] => 0.010703086853027
)
[21] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '336335' ORDER BY item_per_off
[execution_time] => 0.011284828186035
)
[22] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '168488' ORDER BY item_per_off
[execution_time] => 0.009782075881958
)
[23] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '283877' ORDER BY item_per_off
[execution_time] => 0.011852979660034
)
)
)
)