Array
(
[0] => Array
(
[api_query] => http://api.salecamel.com?api_key=123456789&do_get=local_locations
[execution_time] => 0.14007592201233
[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.047735929489136
)
)
)
[1] => Array
(
[api_query] => http://api.salecamel.com?api_key=123456789&do_get=get_local&location=Federal%2C+Way%2C+WA&radius=10&search_limit=15
[execution_time] => 9.0622549057007
[from_api] => Array
(
[0] => Array
(
[mysql_query] => SELECT merch_latitude, merch_longitude
FROM merchants_local
WHERE merch_locality='Federal' AND merch_region='Way'
[execution_time] => 0.0090970993041992
)
[1] => Array
(
[news_api_call] => http://hyperlocal-api.outside.in/v1.1/states/WA/cities/Federal%20Way/stories?dev_key=6at3bn2z23e33eu92utrq6pt&sig=634e26f1160417b8d1485b7e46640e10&no-vertical=obituaries
)
[2] => Array
(
[mysql_query] => SELECT data FROM cache_news
WHERE locality = 'Federal Way'
AND region = 'WA'
AND country = 'United States'
AND expires > '1368869316'
[execution_time] => 0.036355018615723
)
[3] => Array
(
[mysql_query] => INSERT INTO cache_news
(`locality`, `region`, `country`, `expires`, `data`)
VALUES
(
'Federal Way',
'WA',
'United States',
'1368872916',
'{\"links\":{\"last\":\"http://hyperlocal-api.outside.in/v1.1/states/WA/cities/Federal%20Way/stories?no-vertical=obituaries&page=1&dev_key=6at3bn2z23e33eu92utrq6pt&sig=634e26f1160417b8d1485b7e46640e10\",\"first\":\"http://hyperlocal-api.outside.in/v1.1/states/WA/cities/Federal%20Way/stories?no-vertical=obituaries&page=1&dev_key=6at3bn2z23e33eu92utrq6pt&sig=634e26f1160417b8d1485b7e46640e10\"},\"total\":0,\"location\":{\"display_name\":\"Federal Way, WA\",\"state\":\"Washington\",\"url\":\"http://outside.in/federal-way-wa?utm_content=Federal_Way_WA&utm_source=API_OutsideIn_0&utm_medium=API&utm_campaign=APILinkback\",\"lng\":-122.33770751953125,\"lat\":47.30982208251953,\"uuid\":\"0ed9f35c-6da3-458d-bf87-f6fc4407e356\",\"city\":\"Federal Way\",\"category\":{\"name\":\"city\",\"display_name\":\"City / Town / Village\"},\"state_abbrev\":\"WA\",\"url_name\":\"federal-way-wa\",\"hot_for_requested\":false},\"stories\":[]}'
)
ON DUPLICATE KEY UPDATE expires = '1368872916', data = '{\"links\":{\"last\":\"http://hyperlocal-api.outside.in/v1.1/states/WA/cities/Federal%20Way/stories?no-vertical=obituaries&page=1&dev_key=6at3bn2z23e33eu92utrq6pt&sig=634e26f1160417b8d1485b7e46640e10\",\"first\":\"http://hyperlocal-api.outside.in/v1.1/states/WA/cities/Federal%20Way/stories?no-vertical=obituaries&page=1&dev_key=6at3bn2z23e33eu92utrq6pt&sig=634e26f1160417b8d1485b7e46640e10\"},\"total\":0,\"location\":{\"display_name\":\"Federal Way, WA\",\"state\":\"Washington\",\"url\":\"http://outside.in/federal-way-wa?utm_content=Federal_Way_WA&utm_source=API_OutsideIn_0&utm_medium=API&utm_campaign=APILinkback\",\"lng\":-122.33770751953125,\"lat\":47.30982208251953,\"uuid\":\"0ed9f35c-6da3-458d-bf87-f6fc4407e356\",\"city\":\"Federal Way\",\"category\":{\"name\":\"city\",\"display_name\":\"City / Town / Village\"},\"state_abbrev\":\"WA\",\"url_name\":\"federal-way-wa\",\"hot_for_requested\":false},\"stories\":[]}'
[execution_time] => 0.058081865310669
)
[4] => Array
(
[mysql_query] => SELECT data FROM cache_weather
WHERE locality = 'Federal Way'
AND region = 'WA'
AND country = 'United States'
AND expires > '1368869316'
[execution_time] => 0.00052905082702637
)
[5] => Array
(
[mysql_query] => INSERT INTO cache_weather
(`locality`, `region`, `country`, `expires`, `data`)
VALUES
(
'Federal Way',
'WA',
'United States',
'1368872916',
'{ \"data\": { \"current_condition\": [ {\"cloudcover\": \"75\", \"humidity\": \"77\", \"observation_time\": \"09:28 AM\", \"precipMM\": \"0.0\", \"pressure\": \"1019\", \"temp_C\": \"12\", \"temp_F\": \"54\", \"visibility\": \"16\", \"weatherCode\": \"116\", \"weatherDesc\": [ {\"value\": \"Partly Cloudy\" } ], \"weatherIconUrl\": [ {\"value\": \"http:\\/\\/www.worldweatheronline.com\\/images\\/wsymbols01_png_64\\/wsymbol_0004_black_low_cloud.png\" } ], \"winddir16Point\": \"SSW\", \"winddirDegree\": \"210\", \"windspeedKmph\": \"17\", \"windspeedMiles\": \"11\" } ], \"request\": [ {\"query\": \"Federal Way, United States Of America\", \"type\": \"City\" } ], \"weather\": [ {\"date\": \"2013-05-18\", \"precipMM\": \"0.4\", \"tempMaxC\": \"15\", \"tempMaxF\": \"59\", \"tempMinC\": \"7\", \"tempMinF\": \"45\", \"weatherCode\": \"122\", \"weatherDesc\": [ {\"value\": \"Overcast\" } ], \"weatherIconUrl\": [ {\"value\": \"http:\\/\\/www.worldweatheronline.com\\/images\\/wsymbols01_png_64\\/wsymbol_0004_black_low_cloud.png\" } ], \"winddir16Point\": \"SSW\", \"winddirDegree\": \"213\", \"winddirection\": \"SSW\", \"windspeedKmph\": \"13\", \"windspeedMiles\": \"8\" }, {\"date\": \"2013-05-19\", \"precipMM\": \"0.0\", \"tempMaxC\": \"20\", \"tempMaxF\": \"67\", \"tempMinC\": \"10\", \"tempMinF\": \"51\", \"weatherCode\": \"116\", \"weatherDesc\": [ {\"value\": \"Partly Cloudy\" } ], \"weatherIconUrl\": [ {\"value\": \"http:\\/\\/www.worldweatheronline.com\\/images\\/wsymbols01_png_64\\/wsymbol_0002_sunny_intervals.png\" } ], \"winddir16Point\": \"WNW\", \"winddirDegree\": \"291\", \"winddirection\": \"WNW\", \"windspeedKmph\": \"10\", \"windspeedMiles\": \"6\" }, {\"date\": \"2013-05-20\", \"precipMM\": \"0.0\", \"tempMaxC\": \"21\", \"tempMaxF\": \"69\", \"tempMinC\": \"6\", \"tempMinF\": \"43\", \"weatherCode\": \"113\", \"weatherDesc\": [ {\"value\": \"Sunny\" } ], \"weatherIconUrl\": [ {\"value\": \"http:\\/\\/www.worldweatheronline.com\\/images\\/wsymbols01_png_64\\/wsymbol_0001_sunny.png\" } ], \"winddir16Point\": \"W\", \"winddirDegree\": \"270\", \"winddirection\": \"W\", \"windspeedKmph\": \"7\", \"windspeedMiles\": \"4\" }, {\"date\": \"2013-05-21\", \"precipMM\": \"3.4\", \"tempMaxC\": \"12\", \"tempMaxF\": \"54\", \"tempMinC\": \"2\", \"tempMinF\": \"36\", \"weatherCode\": \"263\", \"weatherDesc\": [ {\"value\": \"Patchy light drizzle\" } ], \"weatherIconUrl\": [ {\"value\": \"http:\\/\\/www.worldweatheronline.com\\/images\\/wsymbols01_png_64\\/wsymbol_0009_light_rain_showers.png\" } ], \"winddir16Point\": \"SSW\", \"winddirDegree\": \"212\", \"winddirection\": \"SSW\", \"windspeedKmph\": \"18\", \"windspeedMiles\": \"11\" } ] }}'
)
ON DUPLICATE KEY UPDATE expires = '1368872916', data = '{ \"data\": { \"current_condition\": [ {\"cloudcover\": \"75\", \"humidity\": \"77\", \"observation_time\": \"09:28 AM\", \"precipMM\": \"0.0\", \"pressure\": \"1019\", \"temp_C\": \"12\", \"temp_F\": \"54\", \"visibility\": \"16\", \"weatherCode\": \"116\", \"weatherDesc\": [ {\"value\": \"Partly Cloudy\" } ], \"weatherIconUrl\": [ {\"value\": \"http:\\/\\/www.worldweatheronline.com\\/images\\/wsymbols01_png_64\\/wsymbol_0004_black_low_cloud.png\" } ], \"winddir16Point\": \"SSW\", \"winddirDegree\": \"210\", \"windspeedKmph\": \"17\", \"windspeedMiles\": \"11\" } ], \"request\": [ {\"query\": \"Federal Way, United States Of America\", \"type\": \"City\" } ], \"weather\": [ {\"date\": \"2013-05-18\", \"precipMM\": \"0.4\", \"tempMaxC\": \"15\", \"tempMaxF\": \"59\", \"tempMinC\": \"7\", \"tempMinF\": \"45\", \"weatherCode\": \"122\", \"weatherDesc\": [ {\"value\": \"Overcast\" } ], \"weatherIconUrl\": [ {\"value\": \"http:\\/\\/www.worldweatheronline.com\\/images\\/wsymbols01_png_64\\/wsymbol_0004_black_low_cloud.png\" } ], \"winddir16Point\": \"SSW\", \"winddirDegree\": \"213\", \"winddirection\": \"SSW\", \"windspeedKmph\": \"13\", \"windspeedMiles\": \"8\" }, {\"date\": \"2013-05-19\", \"precipMM\": \"0.0\", \"tempMaxC\": \"20\", \"tempMaxF\": \"67\", \"tempMinC\": \"10\", \"tempMinF\": \"51\", \"weatherCode\": \"116\", \"weatherDesc\": [ {\"value\": \"Partly Cloudy\" } ], \"weatherIconUrl\": [ {\"value\": \"http:\\/\\/www.worldweatheronline.com\\/images\\/wsymbols01_png_64\\/wsymbol_0002_sunny_intervals.png\" } ], \"winddir16Point\": \"WNW\", \"winddirDegree\": \"291\", \"winddirection\": \"WNW\", \"windspeedKmph\": \"10\", \"windspeedMiles\": \"6\" }, {\"date\": \"2013-05-20\", \"precipMM\": \"0.0\", \"tempMaxC\": \"21\", \"tempMaxF\": \"69\", \"tempMinC\": \"6\", \"tempMinF\": \"43\", \"weatherCode\": \"113\", \"weatherDesc\": [ {\"value\": \"Sunny\" } ], \"weatherIconUrl\": [ {\"value\": \"http:\\/\\/www.worldweatheronline.com\\/images\\/wsymbols01_png_64\\/wsymbol_0001_sunny.png\" } ], \"winddir16Point\": \"W\", \"winddirDegree\": \"270\", \"winddirection\": \"W\", \"windspeedKmph\": \"7\", \"windspeedMiles\": \"4\" }, {\"date\": \"2013-05-21\", \"precipMM\": \"3.4\", \"tempMaxC\": \"12\", \"tempMaxF\": \"54\", \"tempMinC\": \"2\", \"tempMinF\": \"36\", \"weatherCode\": \"263\", \"weatherDesc\": [ {\"value\": \"Patchy light drizzle\" } ], \"weatherIconUrl\": [ {\"value\": \"http:\\/\\/www.worldweatheronline.com\\/images\\/wsymbols01_png_64\\/wsymbol_0009_light_rain_showers.png\" } ], \"winddir16Point\": \"SSW\", \"winddirDegree\": \"212\", \"winddirection\": \"SSW\", \"windspeedKmph\": \"18\", \"windspeedMiles\": \"11\" } ] }}'
[execution_time] => 0.20355105400085
)
[6] => Array
(
[mysql_query] => SELECT *, ( 3959 * acos( cos( radians(47.3008) ) * cos( radians( merch_latitude ) ) * cos( radians( merch_longitude ) - radians(-122.32946) ) + sin( radians(47.3008) ) * sin( radians( merch_latitude ) ) ) ) AS distance
FROM merchants_local
HAVING distance < 10
ORDER BY distance
[execution_time] => 0.020114898681641
)
[7] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '338036' ORDER BY item_per_off
[execution_time] => 0.0067877769470215
)
[8] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '159490' ORDER BY item_per_off
[execution_time] => 0.01061487197876
)
[9] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '156727' ORDER BY item_per_off
[execution_time] => 0.010905027389526
)
[10] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '168389' ORDER BY item_per_off
[execution_time] => 0.010277986526489
)
[11] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '215068' ORDER BY item_per_off
[execution_time] => 0.011384963989258
)
[12] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '159012' ORDER BY item_per_off
[execution_time] => 0.013475894927979
)
[13] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '260250' ORDER BY item_per_off
[execution_time] => 0.01238489151001
)
[14] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '155315' ORDER BY item_per_off
[execution_time] => 0.0076489448547363
)
[15] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '338479' ORDER BY item_per_off
[execution_time] => 0.0070230960845947
)
[16] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '165382' ORDER BY item_per_off
[execution_time] => 0.0073230266571045
)
[17] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '338513' ORDER BY item_per_off
[execution_time] => 0.012382030487061
)
[18] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '338818' ORDER BY item_per_off
[execution_time] => 0.011266946792603
)
[19] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '259182' ORDER BY item_per_off
[execution_time] => 0.010689973831177
)
[20] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '155735' ORDER BY item_per_off
[execution_time] => 0.012714147567749
)
[21] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '129670' ORDER BY item_per_off
[execution_time] => 0.0070121288299561
)
[22] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '164255' ORDER BY item_per_off
[execution_time] => 0.0091590881347656
)
[23] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '338494' ORDER BY item_per_off
[execution_time] => 0.011335849761963
)
)
)
)