Array
(
[0] => Array
(
[api_query] => http://api.salecamel.com?api_key=123456789&do_get=local_locations
[execution_time] => 0.13890910148621
[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.048427820205688
)
)
)
[1] => Array
(
[api_query] => http://api.salecamel.com?api_key=123456789&do_get=get_local&location=Los%2C+Altos%2C+CA&radius=10&search_limit=15
[execution_time] => 5.6709339618683
[from_api] => Array
(
[0] => Array
(
[mysql_query] => SELECT merch_latitude, merch_longitude
FROM merchants_local
WHERE merch_locality='Los' AND merch_region='Altos'
[execution_time] => 0.0070509910583496
)
[1] => Array
(
[news_api_call] => http://hyperlocal-api.outside.in/v1.1/states/CA/cities/Los%20Altos/stories?dev_key=6at3bn2z23e33eu92utrq6pt&sig=1e2de6bf6c85c60a1bc15ada01689969&no-vertical=obituaries
)
[2] => Array
(
[mysql_query] => SELECT data FROM cache_news
WHERE locality = 'Los Altos'
AND region = 'CA'
AND country = 'United States'
AND expires > '1369197618'
[execution_time] => 0.00052380561828613
)
[3] => Array
(
[mysql_query] => INSERT INTO cache_news
(`locality`, `region`, `country`, `expires`, `data`)
VALUES
(
'Los Altos',
'CA',
'United States',
'1369201218',
'{\"links\":{\"last\":\"http://10.215.139.79/v1.1/states/CA/cities/Los%20Altos/stories?no-vertical=obituaries&page=1&dev_key=6at3bn2z23e33eu92utrq6pt&sig=1e2de6bf6c85c60a1bc15ada01689969\",\"first\":\"http://10.215.139.79/v1.1/states/CA/cities/Los%20Altos/stories?no-vertical=obituaries&page=1&dev_key=6at3bn2z23e33eu92utrq6pt&sig=1e2de6bf6c85c60a1bc15ada01689969\"},\"total\":0,\"location\":{\"display_name\":\"Los Altos, CA\",\"state\":\"California\",\"url\":\"http://outside.in/los-altos-ca?utm_content=Los_Altos_CA&utm_source=API_OutsideIn_0&utm_medium=API&utm_campaign=APILinkback\",\"lng\":-122.09697723388672,\"uuid\":\"f4ce1da7-e7e9-4d5f-aee6-f9f584f542ce\",\"city\":\"Los Altos\",\"lat\":37.36866760253906,\"category\":{\"name\":\"city\",\"display_name\":\"City / Town / Village\"},\"hot_for_requested\":false,\"state_abbrev\":\"CA\",\"url_name\":\"los-altos-ca\"},\"stories\":[]}'
)
ON DUPLICATE KEY UPDATE expires = '1369201218', data = '{\"links\":{\"last\":\"http://10.215.139.79/v1.1/states/CA/cities/Los%20Altos/stories?no-vertical=obituaries&page=1&dev_key=6at3bn2z23e33eu92utrq6pt&sig=1e2de6bf6c85c60a1bc15ada01689969\",\"first\":\"http://10.215.139.79/v1.1/states/CA/cities/Los%20Altos/stories?no-vertical=obituaries&page=1&dev_key=6at3bn2z23e33eu92utrq6pt&sig=1e2de6bf6c85c60a1bc15ada01689969\"},\"total\":0,\"location\":{\"display_name\":\"Los Altos, CA\",\"state\":\"California\",\"url\":\"http://outside.in/los-altos-ca?utm_content=Los_Altos_CA&utm_source=API_OutsideIn_0&utm_medium=API&utm_campaign=APILinkback\",\"lng\":-122.09697723388672,\"uuid\":\"f4ce1da7-e7e9-4d5f-aee6-f9f584f542ce\",\"city\":\"Los Altos\",\"lat\":37.36866760253906,\"category\":{\"name\":\"city\",\"display_name\":\"City / Town / Village\"},\"hot_for_requested\":false,\"state_abbrev\":\"CA\",\"url_name\":\"los-altos-ca\"},\"stories\":[]}'
[execution_time] => 0.076871156692505
)
[4] => Array
(
[mysql_query] => SELECT data FROM cache_weather
WHERE locality = 'Los Altos'
AND region = 'CA'
AND country = 'United States'
AND expires > '1369197618'
[execution_time] => 0.00047802925109863
)
[5] => Array
(
[mysql_query] => INSERT INTO cache_weather
(`locality`, `region`, `country`, `expires`, `data`)
VALUES
(
'Los Altos',
'CA',
'United States',
'1369201218',
'{ \"data\": { \"current_condition\": [ {\"cloudcover\": \"0\", \"humidity\": \"47\", \"observation_time\": \"04:40 AM\", \"precipMM\": \"0.0\", \"pressure\": \"1016\", \"temp_C\": \"14\", \"temp_F\": \"57\", \"visibility\": \"16\", \"weatherCode\": \"113\", \"weatherDesc\": [ {\"value\": \"Clear\" } ], \"weatherIconUrl\": [ {\"value\": \"http:\\/\\/www.worldweatheronline.com\\/images\\/wsymbols01_png_64\\/wsymbol_0008_clear_sky_night.png\" } ], \"winddir16Point\": \"WNW\", \"winddirDegree\": \"290\", \"windspeedKmph\": \"15\", \"windspeedMiles\": \"9\" } ], \"request\": [ {\"query\": \"Los Altos, United States Of America\", \"type\": \"City\" } ], \"weather\": [ {\"date\": \"2013-05-21\", \"precipMM\": \"0.0\", \"tempMaxC\": \"21\", \"tempMaxF\": \"70\", \"tempMinC\": \"9\", \"tempMinF\": \"48\", \"weatherCode\": \"113\", \"weatherDesc\": [ {\"value\": \"Sunny\" } ], \"weatherIconUrl\": [ {\"value\": \"http:\\/\\/www.worldweatheronline.com\\/images\\/wsymbols01_png_64\\/wsymbol_0001_sunny.png\" } ], \"winddir16Point\": \"N\", \"winddirDegree\": \"350\", \"winddirection\": \"N\", \"windspeedKmph\": \"27\", \"windspeedMiles\": \"17\" }, {\"date\": \"2013-05-22\", \"precipMM\": \"0.0\", \"tempMaxC\": \"21\", \"tempMaxF\": \"70\", \"tempMinC\": \"9\", \"tempMinF\": \"49\", \"weatherCode\": \"113\", \"weatherDesc\": [ {\"value\": \"Sunny\" } ], \"weatherIconUrl\": [ {\"value\": \"http:\\/\\/www.worldweatheronline.com\\/images\\/wsymbols01_png_64\\/wsymbol_0001_sunny.png\" } ], \"winddir16Point\": \"NNW\", \"winddirDegree\": \"333\", \"winddirection\": \"NNW\", \"windspeedKmph\": \"23\", \"windspeedMiles\": \"14\" }, {\"date\": \"2013-05-23\", \"precipMM\": \"0.0\", \"tempMaxC\": \"21\", \"tempMaxF\": \"69\", \"tempMinC\": \"9\", \"tempMinF\": \"48\", \"weatherCode\": \"113\", \"weatherDesc\": [ {\"value\": \"Sunny\" } ], \"weatherIconUrl\": [ {\"value\": \"http:\\/\\/www.worldweatheronline.com\\/images\\/wsymbols01_png_64\\/wsymbol_0001_sunny.png\" } ], \"winddir16Point\": \"NNW\", \"winddirDegree\": \"340\", \"winddirection\": \"NNW\", \"windspeedKmph\": \"28\", \"windspeedMiles\": \"17\" }, {\"date\": \"2013-05-24\", \"precipMM\": \"0.0\", \"tempMaxC\": \"19\", \"tempMaxF\": \"66\", \"tempMinC\": \"9\", \"tempMinF\": \"49\", \"weatherCode\": \"113\", \"weatherDesc\": [ {\"value\": \"Sunny\" } ], \"weatherIconUrl\": [ {\"value\": \"http:\\/\\/www.worldweatheronline.com\\/images\\/wsymbols01_png_64\\/wsymbol_0001_sunny.png\" } ], \"winddir16Point\": \"NNW\", \"winddirDegree\": \"330\", \"winddirection\": \"NNW\", \"windspeedKmph\": \"26\", \"windspeedMiles\": \"16\" } ] }}'
)
ON DUPLICATE KEY UPDATE expires = '1369201218', data = '{ \"data\": { \"current_condition\": [ {\"cloudcover\": \"0\", \"humidity\": \"47\", \"observation_time\": \"04:40 AM\", \"precipMM\": \"0.0\", \"pressure\": \"1016\", \"temp_C\": \"14\", \"temp_F\": \"57\", \"visibility\": \"16\", \"weatherCode\": \"113\", \"weatherDesc\": [ {\"value\": \"Clear\" } ], \"weatherIconUrl\": [ {\"value\": \"http:\\/\\/www.worldweatheronline.com\\/images\\/wsymbols01_png_64\\/wsymbol_0008_clear_sky_night.png\" } ], \"winddir16Point\": \"WNW\", \"winddirDegree\": \"290\", \"windspeedKmph\": \"15\", \"windspeedMiles\": \"9\" } ], \"request\": [ {\"query\": \"Los Altos, United States Of America\", \"type\": \"City\" } ], \"weather\": [ {\"date\": \"2013-05-21\", \"precipMM\": \"0.0\", \"tempMaxC\": \"21\", \"tempMaxF\": \"70\", \"tempMinC\": \"9\", \"tempMinF\": \"48\", \"weatherCode\": \"113\", \"weatherDesc\": [ {\"value\": \"Sunny\" } ], \"weatherIconUrl\": [ {\"value\": \"http:\\/\\/www.worldweatheronline.com\\/images\\/wsymbols01_png_64\\/wsymbol_0001_sunny.png\" } ], \"winddir16Point\": \"N\", \"winddirDegree\": \"350\", \"winddirection\": \"N\", \"windspeedKmph\": \"27\", \"windspeedMiles\": \"17\" }, {\"date\": \"2013-05-22\", \"precipMM\": \"0.0\", \"tempMaxC\": \"21\", \"tempMaxF\": \"70\", \"tempMinC\": \"9\", \"tempMinF\": \"49\", \"weatherCode\": \"113\", \"weatherDesc\": [ {\"value\": \"Sunny\" } ], \"weatherIconUrl\": [ {\"value\": \"http:\\/\\/www.worldweatheronline.com\\/images\\/wsymbols01_png_64\\/wsymbol_0001_sunny.png\" } ], \"winddir16Point\": \"NNW\", \"winddirDegree\": \"333\", \"winddirection\": \"NNW\", \"windspeedKmph\": \"23\", \"windspeedMiles\": \"14\" }, {\"date\": \"2013-05-23\", \"precipMM\": \"0.0\", \"tempMaxC\": \"21\", \"tempMaxF\": \"69\", \"tempMinC\": \"9\", \"tempMinF\": \"48\", \"weatherCode\": \"113\", \"weatherDesc\": [ {\"value\": \"Sunny\" } ], \"weatherIconUrl\": [ {\"value\": \"http:\\/\\/www.worldweatheronline.com\\/images\\/wsymbols01_png_64\\/wsymbol_0001_sunny.png\" } ], \"winddir16Point\": \"NNW\", \"winddirDegree\": \"340\", \"winddirection\": \"NNW\", \"windspeedKmph\": \"28\", \"windspeedMiles\": \"17\" }, {\"date\": \"2013-05-24\", \"precipMM\": \"0.0\", \"tempMaxC\": \"19\", \"tempMaxF\": \"66\", \"tempMinC\": \"9\", \"tempMinF\": \"49\", \"weatherCode\": \"113\", \"weatherDesc\": [ {\"value\": \"Sunny\" } ], \"weatherIconUrl\": [ {\"value\": \"http:\\/\\/www.worldweatheronline.com\\/images\\/wsymbols01_png_64\\/wsymbol_0001_sunny.png\" } ], \"winddir16Point\": \"NNW\", \"winddirDegree\": \"330\", \"winddirection\": \"NNW\", \"windspeedKmph\": \"26\", \"windspeedMiles\": \"16\" } ] }}'
[execution_time] => 0.16166591644287
)
[6] => Array
(
[mysql_query] => SELECT *, ( 3959 * acos( cos( radians(37.38308) ) * cos( radians( merch_latitude ) ) * cos( radians( merch_longitude ) - radians(-122.114227) ) + sin( radians(37.38308) ) * sin( radians( merch_latitude ) ) ) ) AS distance
FROM merchants_local
HAVING distance < 10
ORDER BY distance
[execution_time] => 0.021013975143433
)
[7] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '281874' ORDER BY item_per_off
[execution_time] => 0.0076570510864258
)
[8] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '216491' ORDER BY item_per_off
[execution_time] => 0.0072238445281982
)
[9] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '334127' ORDER BY item_per_off
[execution_time] => 0.0071830749511719
)
[10] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '156027' ORDER BY item_per_off
[execution_time] => 0.0072720050811768
)
[11] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '330238' ORDER BY item_per_off
[execution_time] => 0.007192850112915
)
[12] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '281875' ORDER BY item_per_off
[execution_time] => 0.0071618556976318
)
[13] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '134918' ORDER BY item_per_off
[execution_time] => 0.0071690082550049
)
[14] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '168841' ORDER BY item_per_off
[execution_time] => 0.0072150230407715
)
[15] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '134672' ORDER BY item_per_off
[execution_time] => 0.0072550773620605
)
[16] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '164388' ORDER BY item_per_off
[execution_time] => 0.0072200298309326
)
[17] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '258110' ORDER BY item_per_off
[execution_time] => 0.0072200298309326
)
[18] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '195793' ORDER BY item_per_off
[execution_time] => 0.0072600841522217
)
[19] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '124686' ORDER BY item_per_off
[execution_time] => 0.007235050201416
)
[20] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '58539' ORDER BY item_per_off
[execution_time] => 0.0072009563446045
)
[21] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '122945' ORDER BY item_per_off
[execution_time] => 0.0072059631347656
)
[22] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '127868' ORDER BY item_per_off
[execution_time] => 0.0072050094604492
)
[23] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '164653' ORDER BY item_per_off
[execution_time] => 0.0072989463806152
)
[24] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '161244' ORDER BY item_per_off
[execution_time] => 0.0073039531707764
)
[25] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '162195' ORDER BY item_per_off
[execution_time] => 0.0072290897369385
)
[26] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '123722' ORDER BY item_per_off
[execution_time] => 0.0071790218353271
)
[27] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '158515' ORDER BY item_per_off
[execution_time] => 0.007253885269165
)
[28] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '333684' ORDER BY item_per_off
[execution_time] => 0.0071918964385986
)
[29] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '339117' ORDER BY item_per_off
[execution_time] => 0.0071189403533936
)
[30] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '331298' ORDER BY item_per_off
[execution_time] => 0.0071988105773926
)
[31] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '333224' ORDER BY item_per_off
[execution_time] => 0.0071802139282227
)
[32] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '295856' ORDER BY item_per_off
[execution_time] => 0.0072031021118164
)
[33] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '338474' ORDER BY item_per_off
[execution_time] => 0.0071139335632324
)
[34] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '334511' ORDER BY item_per_off
[execution_time] => 0.0071361064910889
)
)
)
)