Array
(
[0] => Array
(
[api_query] => http://api.salecamel.com?api_key=123456789&do_get=local_locations
[execution_time] => 0.16127705574036
[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.058737993240356
)
)
)
[1] => Array
(
[api_query] => http://api.salecamel.com?api_key=123456789&do_get=get_local&location=Kansas%2C+City%2C+KS&radius=10&search_limit=15
[execution_time] => 8.5246920585632
[from_api] => Array
(
[0] => Array
(
[mysql_query] => SELECT merch_latitude, merch_longitude
FROM merchants_local
WHERE merch_locality='Kansas' AND merch_region='City'
[execution_time] => 0.012723922729492
)
[1] => Array
(
[news_api_call] => http://hyperlocal-api.outside.in/v1.1/states/KS/cities/Kansas%20City/stories?dev_key=6at3bn2z23e33eu92utrq6pt&sig=660426e4a91f4d07afd96c6b78b84cde&no-vertical=obituaries
)
[2] => Array
(
[mysql_query] => SELECT data FROM cache_news
WHERE locality = 'Kansas City'
AND region = 'KS'
AND country = 'United States'
AND expires > '1369088678'
[execution_time] => 0.00040388107299805
)
[3] => Array
(
[mysql_query] => INSERT INTO cache_news
(`locality`, `region`, `country`, `expires`, `data`)
VALUES
(
'Kansas City',
'KS',
'United States',
'1369092278',
'{\"links\":{\"last\":\"http://10.66.199.98/v1.1/states/KS/cities/Kansas%20City/stories?no-vertical=obituaries&page=1&dev_key=6at3bn2z23e33eu92utrq6pt&sig=660426e4a91f4d07afd96c6b78b84cde\",\"first\":\"http://10.66.199.98/v1.1/states/KS/cities/Kansas%20City/stories?no-vertical=obituaries&page=1&dev_key=6at3bn2z23e33eu92utrq6pt&sig=660426e4a91f4d07afd96c6b78b84cde\"},\"total\":0,\"location\":{\"display_name\":\"Kansas City, KS\",\"state\":\"Kansas\",\"url\":\"http://outside.in/kansas-city-ks?utm_content=Kansas_City_KS&utm_source=API_OutsideIn_0&utm_medium=API&utm_campaign=APILinkback\",\"lng\":-94.74420928955078,\"uuid\":\"a89837d7-1d75-4463-ac0d-d804ab715f75\",\"city\":\"Kansas City\",\"lat\":39.12331008911133,\"category\":{\"name\":\"city\",\"display_name\":\"City / Town / Village\"},\"hot_for_requested\":false,\"state_abbrev\":\"KS\",\"url_name\":\"kansas-city-ks\"},\"stories\":[]}'
)
ON DUPLICATE KEY UPDATE expires = '1369092278', data = '{\"links\":{\"last\":\"http://10.66.199.98/v1.1/states/KS/cities/Kansas%20City/stories?no-vertical=obituaries&page=1&dev_key=6at3bn2z23e33eu92utrq6pt&sig=660426e4a91f4d07afd96c6b78b84cde\",\"first\":\"http://10.66.199.98/v1.1/states/KS/cities/Kansas%20City/stories?no-vertical=obituaries&page=1&dev_key=6at3bn2z23e33eu92utrq6pt&sig=660426e4a91f4d07afd96c6b78b84cde\"},\"total\":0,\"location\":{\"display_name\":\"Kansas City, KS\",\"state\":\"Kansas\",\"url\":\"http://outside.in/kansas-city-ks?utm_content=Kansas_City_KS&utm_source=API_OutsideIn_0&utm_medium=API&utm_campaign=APILinkback\",\"lng\":-94.74420928955078,\"uuid\":\"a89837d7-1d75-4463-ac0d-d804ab715f75\",\"city\":\"Kansas City\",\"lat\":39.12331008911133,\"category\":{\"name\":\"city\",\"display_name\":\"City / Town / Village\"},\"hot_for_requested\":false,\"state_abbrev\":\"KS\",\"url_name\":\"kansas-city-ks\"},\"stories\":[]}'
[execution_time] => 0.035920858383179
)
[4] => Array
(
[mysql_query] => SELECT data FROM cache_weather
WHERE locality = 'Kansas City'
AND region = 'KS'
AND country = 'United States'
AND expires > '1369088678'
[execution_time] => 0.00043296813964844
)
[5] => Array
(
[mysql_query] => INSERT INTO cache_weather
(`locality`, `region`, `country`, `expires`, `data`)
VALUES
(
'Kansas City',
'KS',
'United States',
'1369092278',
'{ \"data\": { \"current_condition\": [ {\"cloudcover\": \"75\", \"humidity\": \"61\", \"observation_time\": \"10:24 PM\", \"precipMM\": \"0.2\", \"pressure\": \"1005\", \"temp_C\": \"26\", \"temp_F\": \"79\", \"visibility\": \"16\", \"weatherCode\": \"116\", \"weatherDesc\": [ {\"value\": \"Partly Cloudy\" } ], \"weatherIconUrl\": [ {\"value\": \"http:\\/\\/www.worldweatheronline.com\\/images\\/wsymbols01_png_64\\/wsymbol_0002_sunny_intervals.png\" } ], \"winddir16Point\": \"SSE\", \"winddirDegree\": \"150\", \"windspeedKmph\": \"13\", \"windspeedMiles\": \"8\" } ], \"request\": [ {\"query\": \"Kansas City, United States Of America\", \"type\": \"City\" } ], \"weather\": [ {\"date\": \"2013-05-20\", \"precipMM\": \"2.6\", \"tempMaxC\": \"26\", \"tempMaxF\": \"78\", \"tempMinC\": \"16\", \"tempMinF\": \"61\", \"weatherCode\": \"176\", \"weatherDesc\": [ {\"value\": \"Patchy rain nearby\" } ], \"weatherIconUrl\": [ {\"value\": \"http:\\/\\/www.worldweatheronline.com\\/images\\/wsymbols01_png_64\\/wsymbol_0009_light_rain_showers.png\" } ], \"winddir16Point\": \"SSW\", \"winddirDegree\": \"200\", \"winddirection\": \"SSW\", \"windspeedKmph\": \"21\", \"windspeedMiles\": \"13\" }, {\"date\": \"2013-05-21\", \"precipMM\": \"0.4\", \"tempMaxC\": \"24\", \"tempMaxF\": \"76\", \"tempMinC\": \"14\", \"tempMinF\": \"57\", \"weatherCode\": \"113\", \"weatherDesc\": [ {\"value\": \"Sunny\" } ], \"weatherIconUrl\": [ {\"value\": \"http:\\/\\/www.worldweatheronline.com\\/images\\/wsymbols01_png_64\\/wsymbol_0001_sunny.png\" } ], \"winddir16Point\": \"WSW\", \"winddirDegree\": \"250\", \"winddirection\": \"WSW\", \"windspeedKmph\": \"15\", \"windspeedMiles\": \"9\" }, {\"date\": \"2013-05-22\", \"precipMM\": \"0.0\", \"tempMaxC\": \"20\", \"tempMaxF\": \"68\", \"tempMinC\": \"13\", \"tempMinF\": \"55\", \"weatherCode\": \"113\", \"weatherDesc\": [ {\"value\": \"Sunny\" } ], \"weatherIconUrl\": [ {\"value\": \"http:\\/\\/www.worldweatheronline.com\\/images\\/wsymbols01_png_64\\/wsymbol_0001_sunny.png\" } ], \"winddir16Point\": \"WNW\", \"winddirDegree\": \"290\", \"winddirection\": \"WNW\", \"windspeedKmph\": \"21\", \"windspeedMiles\": \"13\" }, {\"date\": \"2013-05-23\", \"precipMM\": \"0.0\", \"tempMaxC\": \"20\", \"tempMaxF\": \"68\", \"tempMinC\": \"9\", \"tempMinF\": \"48\", \"weatherCode\": \"113\", \"weatherDesc\": [ {\"value\": \"Sunny\" } ], \"weatherIconUrl\": [ {\"value\": \"http:\\/\\/www.worldweatheronline.com\\/images\\/wsymbols01_png_64\\/wsymbol_0001_sunny.png\" } ], \"winddir16Point\": \"NNE\", \"winddirDegree\": \"32\", \"winddirection\": \"NNE\", \"windspeedKmph\": \"18\", \"windspeedMiles\": \"11\" } ] }}'
)
ON DUPLICATE KEY UPDATE expires = '1369092278', data = '{ \"data\": { \"current_condition\": [ {\"cloudcover\": \"75\", \"humidity\": \"61\", \"observation_time\": \"10:24 PM\", \"precipMM\": \"0.2\", \"pressure\": \"1005\", \"temp_C\": \"26\", \"temp_F\": \"79\", \"visibility\": \"16\", \"weatherCode\": \"116\", \"weatherDesc\": [ {\"value\": \"Partly Cloudy\" } ], \"weatherIconUrl\": [ {\"value\": \"http:\\/\\/www.worldweatheronline.com\\/images\\/wsymbols01_png_64\\/wsymbol_0002_sunny_intervals.png\" } ], \"winddir16Point\": \"SSE\", \"winddirDegree\": \"150\", \"windspeedKmph\": \"13\", \"windspeedMiles\": \"8\" } ], \"request\": [ {\"query\": \"Kansas City, United States Of America\", \"type\": \"City\" } ], \"weather\": [ {\"date\": \"2013-05-20\", \"precipMM\": \"2.6\", \"tempMaxC\": \"26\", \"tempMaxF\": \"78\", \"tempMinC\": \"16\", \"tempMinF\": \"61\", \"weatherCode\": \"176\", \"weatherDesc\": [ {\"value\": \"Patchy rain nearby\" } ], \"weatherIconUrl\": [ {\"value\": \"http:\\/\\/www.worldweatheronline.com\\/images\\/wsymbols01_png_64\\/wsymbol_0009_light_rain_showers.png\" } ], \"winddir16Point\": \"SSW\", \"winddirDegree\": \"200\", \"winddirection\": \"SSW\", \"windspeedKmph\": \"21\", \"windspeedMiles\": \"13\" }, {\"date\": \"2013-05-21\", \"precipMM\": \"0.4\", \"tempMaxC\": \"24\", \"tempMaxF\": \"76\", \"tempMinC\": \"14\", \"tempMinF\": \"57\", \"weatherCode\": \"113\", \"weatherDesc\": [ {\"value\": \"Sunny\" } ], \"weatherIconUrl\": [ {\"value\": \"http:\\/\\/www.worldweatheronline.com\\/images\\/wsymbols01_png_64\\/wsymbol_0001_sunny.png\" } ], \"winddir16Point\": \"WSW\", \"winddirDegree\": \"250\", \"winddirection\": \"WSW\", \"windspeedKmph\": \"15\", \"windspeedMiles\": \"9\" }, {\"date\": \"2013-05-22\", \"precipMM\": \"0.0\", \"tempMaxC\": \"20\", \"tempMaxF\": \"68\", \"tempMinC\": \"13\", \"tempMinF\": \"55\", \"weatherCode\": \"113\", \"weatherDesc\": [ {\"value\": \"Sunny\" } ], \"weatherIconUrl\": [ {\"value\": \"http:\\/\\/www.worldweatheronline.com\\/images\\/wsymbols01_png_64\\/wsymbol_0001_sunny.png\" } ], \"winddir16Point\": \"WNW\", \"winddirDegree\": \"290\", \"winddirection\": \"WNW\", \"windspeedKmph\": \"21\", \"windspeedMiles\": \"13\" }, {\"date\": \"2013-05-23\", \"precipMM\": \"0.0\", \"tempMaxC\": \"20\", \"tempMaxF\": \"68\", \"tempMinC\": \"9\", \"tempMinF\": \"48\", \"weatherCode\": \"113\", \"weatherDesc\": [ {\"value\": \"Sunny\" } ], \"weatherIconUrl\": [ {\"value\": \"http:\\/\\/www.worldweatheronline.com\\/images\\/wsymbols01_png_64\\/wsymbol_0001_sunny.png\" } ], \"winddir16Point\": \"NNE\", \"winddirDegree\": \"32\", \"winddirection\": \"NNE\", \"windspeedKmph\": \"18\", \"windspeedMiles\": \"11\" } ] }}'
[execution_time] => 0.064279079437256
)
[6] => Array
(
[mysql_query] => SELECT *, ( 3959 * acos( cos( radians(39.113522) ) * cos( radians( merch_latitude ) ) * cos( radians( merch_longitude ) - radians(-94.626823) ) + sin( radians(39.113522) ) * sin( radians( merch_latitude ) ) ) ) AS distance
FROM merchants_local
HAVING distance < 10
ORDER BY distance
[execution_time] => 0.021286964416504
)
[7] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '159746' ORDER BY item_per_off
[execution_time] => 0.012209892272949
)
[8] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '337149' ORDER BY item_per_off
[execution_time] => 0.012159109115601
)
[9] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '160215' ORDER BY item_per_off
[execution_time] => 0.0123291015625
)
[10] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '164636' ORDER BY item_per_off
[execution_time] => 0.011245012283325
)
[11] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '337147' ORDER BY item_per_off
[execution_time] => 0.012338161468506
)
[12] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '287257' ORDER BY item_per_off
[execution_time] => 0.010617017745972
)
[13] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '75401' ORDER BY item_per_off
[execution_time] => 0.012251138687134
)
[14] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '156807' ORDER BY item_per_off
[execution_time] => 0.008342981338501
)
[15] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '189249' ORDER BY item_per_off
[execution_time] => 0.0099480152130127
)
[16] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '146593' ORDER BY item_per_off
[execution_time] => 0.012243986129761
)
[17] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '131165' ORDER BY item_per_off
[execution_time] => 0.010779857635498
)
[18] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '327702' ORDER BY item_per_off
[execution_time] => 0.012151002883911
)
[19] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '156687' ORDER BY item_per_off
[execution_time] => 0.012487888336182
)
[20] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '123690' ORDER BY item_per_off
[execution_time] => 0.012136936187744
)
[21] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '126379' ORDER BY item_per_off
[execution_time] => 0.012333869934082
)
)
)
)