Array
(
[0] => Array
(
[api_query] => http://api.salecamel.com?api_key=123456789&do_get=local_locations
[execution_time] => 0.14078712463379
[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.053667068481445
)
)
)
[1] => Array
(
[api_query] => http://api.salecamel.com?api_key=123456789&do_get=get_local&location=Gresham%2C+OR%2C+US&radius=10&search_limit=15
[execution_time] => 9.6138091087341
[from_api] => Array
(
[0] => Array
(
[mysql_query] => SELECT merch_latitude, merch_longitude
FROM merchants_local
WHERE merch_locality='Gresham' AND merch_region='OR'
[execution_time] => 0.0096890926361084
)
[1] => Array
(
[news_api_call] => http://hyperlocal-api.outside.in/v1.1/states/OR/cities/Gresham/stories?dev_key=6at3bn2z23e33eu92utrq6pt&sig=19e7aae29b0a6bc60e50faece160d66c&no-vertical=obituaries
)
[2] => Array
(
[mysql_query] => SELECT data FROM cache_news
WHERE locality = 'Gresham'
AND region = 'OR'
AND country = 'US'
AND expires > '1369132526'
[execution_time] => 0.00087499618530273
)
[3] => Array
(
[mysql_query] => INSERT INTO cache_news
(`locality`, `region`, `country`, `expires`, `data`)
VALUES
(
'Gresham',
'OR',
'US',
'1369136126',
''
)
ON DUPLICATE KEY UPDATE expires = '1369136126', data = ''
[execution_time] => 0.041481971740723
)
[4] => Array
(
[mysql_query] => SELECT data FROM cache_weather
WHERE locality = 'Gresham'
AND region = 'OR'
AND country = 'US'
AND expires > '1369132526'
[execution_time] => 0.00039792060852051
)
[5] => Array
(
[mysql_query] => INSERT INTO cache_weather
(`locality`, `region`, `country`, `expires`, `data`)
VALUES
(
'Gresham',
'OR',
'US',
'1369136126',
'{ \"data\": { \"current_condition\": [ {\"cloudcover\": \"100\", \"humidity\": \"74\", \"observation_time\": \"10:35 AM\", \"precipMM\": \"0.0\", \"pressure\": \"1013\", \"temp_C\": \"12\", \"temp_F\": \"54\", \"visibility\": \"16\", \"weatherCode\": \"122\", \"weatherDesc\": [ {\"value\": \"Overcast\" } ], \"weatherIconUrl\": [ {\"value\": \"http:\\/\\/www.worldweatheronline.com\\/images\\/wsymbols01_png_64\\/wsymbol_0004_black_low_cloud.png\" } ], \"winddir16Point\": \"N\", \"winddirDegree\": \"0\", \"windspeedKmph\": \"0\", \"windspeedMiles\": \"0\" } ], \"request\": [ {\"query\": \"Gresham, United States Of America\", \"type\": \"City\" } ], \"weather\": [ {\"date\": \"2013-05-21\", \"precipMM\": \"7.1\", \"tempMaxC\": \"13\", \"tempMaxF\": \"56\", \"tempMinC\": \"6\", \"tempMinF\": \"42\", \"weatherCode\": \"296\", \"weatherDesc\": [ {\"value\": \"Light rain\" } ], \"weatherIconUrl\": [ {\"value\": \"http:\\/\\/www.worldweatheronline.com\\/images\\/wsymbols01_png_64\\/wsymbol_0017_cloudy_with_light_rain.png\" } ], \"winddir16Point\": \"SSW\", \"winddirDegree\": \"200\", \"winddirection\": \"SSW\", \"windspeedKmph\": \"22\", \"windspeedMiles\": \"14\" }, {\"date\": \"2013-05-22\", \"precipMM\": \"7.0\", \"tempMaxC\": \"9\", \"tempMaxF\": \"48\", \"tempMinC\": \"7\", \"tempMinF\": \"44\", \"weatherCode\": \"302\", \"weatherDesc\": [ {\"value\": \"Moderate rain\" } ], \"weatherIconUrl\": [ {\"value\": \"http:\\/\\/www.worldweatheronline.com\\/images\\/wsymbols01_png_64\\/wsymbol_0018_cloudy_with_heavy_rain.png\" } ], \"winddir16Point\": \"SSW\", \"winddirDegree\": \"200\", \"winddirection\": \"SSW\", \"windspeedKmph\": \"18\", \"windspeedMiles\": \"11\" }, {\"date\": \"2013-05-23\", \"precipMM\": \"4.2\", \"tempMaxC\": \"9\", \"tempMaxF\": \"49\", \"tempMinC\": \"-2\", \"tempMinF\": \"28\", \"weatherCode\": \"296\", \"weatherDesc\": [ {\"value\": \"Light rain\" } ], \"weatherIconUrl\": [ {\"value\": \"http:\\/\\/www.worldweatheronline.com\\/images\\/wsymbols01_png_64\\/wsymbol_0017_cloudy_with_light_rain.png\" } ], \"winddir16Point\": \"ESE\", \"winddirDegree\": \"120\", \"winddirection\": \"ESE\", \"windspeedKmph\": \"9\", \"windspeedMiles\": \"6\" }, {\"date\": \"2013-05-24\", \"precipMM\": \"0.6\", \"tempMaxC\": \"10\", \"tempMaxF\": \"49\", \"tempMinC\": \"3\", \"tempMinF\": \"37\", \"weatherCode\": \"116\", \"weatherDesc\": [ {\"value\": \"Partly Cloudy\" } ], \"weatherIconUrl\": [ {\"value\": \"http:\\/\\/www.worldweatheronline.com\\/images\\/wsymbols01_png_64\\/wsymbol_0002_sunny_intervals.png\" } ], \"winddir16Point\": \"SW\", \"winddirDegree\": \"217\", \"winddirection\": \"SW\", \"windspeedKmph\": \"10\", \"windspeedMiles\": \"6\" } ] }}'
)
ON DUPLICATE KEY UPDATE expires = '1369136126', data = '{ \"data\": { \"current_condition\": [ {\"cloudcover\": \"100\", \"humidity\": \"74\", \"observation_time\": \"10:35 AM\", \"precipMM\": \"0.0\", \"pressure\": \"1013\", \"temp_C\": \"12\", \"temp_F\": \"54\", \"visibility\": \"16\", \"weatherCode\": \"122\", \"weatherDesc\": [ {\"value\": \"Overcast\" } ], \"weatherIconUrl\": [ {\"value\": \"http:\\/\\/www.worldweatheronline.com\\/images\\/wsymbols01_png_64\\/wsymbol_0004_black_low_cloud.png\" } ], \"winddir16Point\": \"N\", \"winddirDegree\": \"0\", \"windspeedKmph\": \"0\", \"windspeedMiles\": \"0\" } ], \"request\": [ {\"query\": \"Gresham, United States Of America\", \"type\": \"City\" } ], \"weather\": [ {\"date\": \"2013-05-21\", \"precipMM\": \"7.1\", \"tempMaxC\": \"13\", \"tempMaxF\": \"56\", \"tempMinC\": \"6\", \"tempMinF\": \"42\", \"weatherCode\": \"296\", \"weatherDesc\": [ {\"value\": \"Light rain\" } ], \"weatherIconUrl\": [ {\"value\": \"http:\\/\\/www.worldweatheronline.com\\/images\\/wsymbols01_png_64\\/wsymbol_0017_cloudy_with_light_rain.png\" } ], \"winddir16Point\": \"SSW\", \"winddirDegree\": \"200\", \"winddirection\": \"SSW\", \"windspeedKmph\": \"22\", \"windspeedMiles\": \"14\" }, {\"date\": \"2013-05-22\", \"precipMM\": \"7.0\", \"tempMaxC\": \"9\", \"tempMaxF\": \"48\", \"tempMinC\": \"7\", \"tempMinF\": \"44\", \"weatherCode\": \"302\", \"weatherDesc\": [ {\"value\": \"Moderate rain\" } ], \"weatherIconUrl\": [ {\"value\": \"http:\\/\\/www.worldweatheronline.com\\/images\\/wsymbols01_png_64\\/wsymbol_0018_cloudy_with_heavy_rain.png\" } ], \"winddir16Point\": \"SSW\", \"winddirDegree\": \"200\", \"winddirection\": \"SSW\", \"windspeedKmph\": \"18\", \"windspeedMiles\": \"11\" }, {\"date\": \"2013-05-23\", \"precipMM\": \"4.2\", \"tempMaxC\": \"9\", \"tempMaxF\": \"49\", \"tempMinC\": \"-2\", \"tempMinF\": \"28\", \"weatherCode\": \"296\", \"weatherDesc\": [ {\"value\": \"Light rain\" } ], \"weatherIconUrl\": [ {\"value\": \"http:\\/\\/www.worldweatheronline.com\\/images\\/wsymbols01_png_64\\/wsymbol_0017_cloudy_with_light_rain.png\" } ], \"winddir16Point\": \"ESE\", \"winddirDegree\": \"120\", \"winddirection\": \"ESE\", \"windspeedKmph\": \"9\", \"windspeedMiles\": \"6\" }, {\"date\": \"2013-05-24\", \"precipMM\": \"0.6\", \"tempMaxC\": \"10\", \"tempMaxF\": \"49\", \"tempMinC\": \"3\", \"tempMinF\": \"37\", \"weatherCode\": \"116\", \"weatherDesc\": [ {\"value\": \"Partly Cloudy\" } ], \"weatherIconUrl\": [ {\"value\": \"http:\\/\\/www.worldweatheronline.com\\/images\\/wsymbols01_png_64\\/wsymbol_0002_sunny_intervals.png\" } ], \"winddir16Point\": \"SW\", \"winddirDegree\": \"217\", \"winddirection\": \"SW\", \"windspeedKmph\": \"10\", \"windspeedMiles\": \"6\" } ] }}'
[execution_time] => 0.061828136444092
)
[6] => Array
(
[mysql_query] => SELECT *, ( 3959 * acos( cos( radians(45.500488) ) * cos( radians( merch_latitude ) ) * cos( radians( merch_longitude ) - radians(-122.42997) ) + sin( radians(45.500488) ) * sin( radians( merch_latitude ) ) ) ) AS distance
FROM merchants_local
HAVING distance < 10
ORDER BY distance
[execution_time] => 0.019110918045044
)
[7] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '262295' ORDER BY item_per_off
[execution_time] => 0.010571002960205
)
[8] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '333666' ORDER BY item_per_off
[execution_time] => 0.011999845504761
)
[9] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '160241' ORDER BY item_per_off
[execution_time] => 0.0085828304290771
)
[10] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '337371' ORDER BY item_per_off
[execution_time] => 0.010145902633667
)
[11] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '264948' ORDER BY item_per_off
[execution_time] => 0.007094144821167
)
[12] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '337372' ORDER BY item_per_off
[execution_time] => 0.015666007995605
)
[13] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '331560' ORDER BY item_per_off
[execution_time] => 0.011390924453735
)
[14] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '337365' ORDER BY item_per_off
[execution_time] => 0.0071449279785156
)
[15] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '318631' ORDER BY item_per_off
[execution_time] => 0.011852025985718
)
[16] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '164153' ORDER BY item_per_off
[execution_time] => 0.011891841888428
)
[17] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '332965' ORDER BY item_per_off
[execution_time] => 0.010687828063965
)
[18] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '302879' ORDER BY item_per_off
[execution_time] => 0.010504961013794
)
[19] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '337331' ORDER BY item_per_off
[execution_time] => 0.011807918548584
)
[20] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '337351' ORDER BY item_per_off
[execution_time] => 0.0137939453125
)
[21] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '337352' ORDER BY item_per_off
[execution_time] => 0.012315988540649
)
[22] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '337367' ORDER BY item_per_off
[execution_time] => 0.0093371868133545
)
[23] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '337343' ORDER BY item_per_off
[execution_time] => 0.016623973846436
)
[24] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '331542' ORDER BY item_per_off
[execution_time] => 0.013236999511719
)
)
)
)