Array
(
[0] => Array
(
[api_query] => http://api.salecamel.com?api_key=123456789&do_get=local_locations
[execution_time] => 0.1409158706665
[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.049105882644653
)
)
)
[1] => Array
(
[api_query] => http://api.salecamel.com?api_key=123456789&do_get=get_local&location=Anaheim%2C+CA%2C+US&radius=10&search_limit=15
[execution_time] => 8.3696389198303
[from_api] => Array
(
[0] => Array
(
[mysql_query] => SELECT merch_latitude, merch_longitude
FROM merchants_local
WHERE merch_locality='Anaheim' AND merch_region='CA'
[execution_time] => 0.0071980953216553
)
[1] => Array
(
[news_api_call] => http://hyperlocal-api.outside.in/v1.1/states/CA/cities/Anaheim/stories?dev_key=6at3bn2z23e33eu92utrq6pt&sig=1a423d34f99c244451443dc12bdba0de&no-vertical=obituaries
)
[2] => Array
(
[mysql_query] => SELECT data FROM cache_news
WHERE locality = 'Anaheim'
AND region = 'CA'
AND country = 'US'
AND expires > '1368860130'
[execution_time] => 0.00036406517028809
)
[3] => Array
(
[mysql_query] => INSERT INTO cache_news
(`locality`, `region`, `country`, `expires`, `data`)
VALUES
(
'Anaheim',
'CA',
'US',
'1368863730',
'{\"links\":{\"last\":\"http://10.66.199.98/v1.1/states/CA/cities/Anaheim/stories?no-vertical=obituaries&page=1&dev_key=6at3bn2z23e33eu92utrq6pt&sig=1a423d34f99c244451443dc12bdba0de\",\"first\":\"http://10.66.199.98/v1.1/states/CA/cities/Anaheim/stories?no-vertical=obituaries&page=1&dev_key=6at3bn2z23e33eu92utrq6pt&sig=1a423d34f99c244451443dc12bdba0de\"},\"total\":0,\"location\":{\"display_name\":\"Anaheim, CA\",\"state\":\"California\",\"url\":\"http://outside.in/anaheim-ca?utm_content=Anaheim_CA&utm_source=API_OutsideIn_0&utm_medium=API&utm_campaign=APILinkback\",\"lng\":-117.85684967041016,\"uuid\":\"5a76c8e9-afde-44ac-b0e8-8df51259c7df\",\"city\":\"Anaheim\",\"lat\":33.839141845703125,\"category\":{\"name\":\"city\",\"display_name\":\"City / Town / Village\"},\"hot_for_requested\":false,\"state_abbrev\":\"CA\",\"url_name\":\"anaheim-ca\"},\"stories\":[]}'
)
ON DUPLICATE KEY UPDATE expires = '1368863730', data = '{\"links\":{\"last\":\"http://10.66.199.98/v1.1/states/CA/cities/Anaheim/stories?no-vertical=obituaries&page=1&dev_key=6at3bn2z23e33eu92utrq6pt&sig=1a423d34f99c244451443dc12bdba0de\",\"first\":\"http://10.66.199.98/v1.1/states/CA/cities/Anaheim/stories?no-vertical=obituaries&page=1&dev_key=6at3bn2z23e33eu92utrq6pt&sig=1a423d34f99c244451443dc12bdba0de\"},\"total\":0,\"location\":{\"display_name\":\"Anaheim, CA\",\"state\":\"California\",\"url\":\"http://outside.in/anaheim-ca?utm_content=Anaheim_CA&utm_source=API_OutsideIn_0&utm_medium=API&utm_campaign=APILinkback\",\"lng\":-117.85684967041016,\"uuid\":\"5a76c8e9-afde-44ac-b0e8-8df51259c7df\",\"city\":\"Anaheim\",\"lat\":33.839141845703125,\"category\":{\"name\":\"city\",\"display_name\":\"City / Town / Village\"},\"hot_for_requested\":false,\"state_abbrev\":\"CA\",\"url_name\":\"anaheim-ca\"},\"stories\":[]}'
[execution_time] => 0.28842711448669
)
[4] => Array
(
[mysql_query] => SELECT data FROM cache_weather
WHERE locality = 'Anaheim'
AND region = 'CA'
AND country = 'US'
AND expires > '1368860130'
[execution_time] => 0.00062203407287598
)
[5] => Array
(
[mysql_query] => INSERT INTO cache_weather
(`locality`, `region`, `country`, `expires`, `data`)
VALUES
(
'Anaheim',
'CA',
'US',
'1368863730',
'{ \"data\": { \"current_condition\": [ {\"cloudcover\": \"0\", \"humidity\": \"70\", \"observation_time\": \"06:55 AM\", \"precipMM\": \"0.0\", \"pressure\": \"1016\", \"temp_C\": \"18\", \"temp_F\": \"65\", \"visibility\": \"16\", \"weatherCode\": \"113\", \"weatherDesc\": [ {\"value\": \"Clear\" } ], \"weatherIconUrl\": [ {\"value\": \"http:\\/\\/www.worldweatheronline.com\\/images\\/wsymbols01_png_64\\/wsymbol_0008_clear_sky_night.png\" } ], \"winddir16Point\": \"S\", \"winddirDegree\": \"190\", \"windspeedKmph\": \"7\", \"windspeedMiles\": \"4\" } ], \"request\": [ {\"query\": \"Anaheim, United States Of America\", \"type\": \"City\" } ], \"weather\": [ {\"date\": \"2013-05-17\", \"precipMM\": \"0.0\", \"tempMaxC\": \"25\", \"tempMaxF\": \"77\", \"tempMinC\": \"15\", \"tempMinF\": \"58\", \"weatherCode\": \"113\", \"weatherDesc\": [ {\"value\": \"Sunny\" } ], \"weatherIconUrl\": [ {\"value\": \"http:\\/\\/www.worldweatheronline.com\\/images\\/wsymbols01_png_64\\/wsymbol_0001_sunny.png\" } ], \"winddir16Point\": \"W\", \"winddirDegree\": \"280\", \"winddirection\": \"W\", \"windspeedKmph\": \"20\", \"windspeedMiles\": \"13\" }, {\"date\": \"2013-05-18\", \"precipMM\": \"0.0\", \"tempMaxC\": \"25\", \"tempMaxF\": \"77\", \"tempMinC\": \"16\", \"tempMinF\": \"60\", \"weatherCode\": \"113\", \"weatherDesc\": [ {\"value\": \"Sunny\" } ], \"weatherIconUrl\": [ {\"value\": \"http:\\/\\/www.worldweatheronline.com\\/images\\/wsymbols01_png_64\\/wsymbol_0001_sunny.png\" } ], \"winddir16Point\": \"SW\", \"winddirDegree\": \"227\", \"winddirection\": \"SW\", \"windspeedKmph\": \"19\", \"windspeedMiles\": \"12\" }, {\"date\": \"2013-05-19\", \"precipMM\": \"0.0\", \"tempMaxC\": \"21\", \"tempMaxF\": \"69\", \"tempMinC\": \"16\", \"tempMinF\": \"60\", \"weatherCode\": \"113\", \"weatherDesc\": [ {\"value\": \"Sunny\" } ], \"weatherIconUrl\": [ {\"value\": \"http:\\/\\/www.worldweatheronline.com\\/images\\/wsymbols01_png_64\\/wsymbol_0001_sunny.png\" } ], \"winddir16Point\": \"WNW\", \"winddirDegree\": \"300\", \"winddirection\": \"WNW\", \"windspeedKmph\": \"8\", \"windspeedMiles\": \"5\" }, {\"date\": \"2013-05-20\", \"precipMM\": \"0.0\", \"tempMaxC\": \"22\", \"tempMaxF\": \"71\", \"tempMinC\": \"16\", \"tempMinF\": \"60\", \"weatherCode\": \"122\", \"weatherDesc\": [ {\"value\": \"Overcast\" } ], \"weatherIconUrl\": [ {\"value\": \"http:\\/\\/www.worldweatheronline.com\\/images\\/wsymbols01_png_64\\/wsymbol_0004_black_low_cloud.png\" } ], \"winddir16Point\": \"W\", \"winddirDegree\": \"280\", \"winddirection\": \"W\", \"windspeedKmph\": \"5\", \"windspeedMiles\": \"3\" } ] }}'
)
ON DUPLICATE KEY UPDATE expires = '1368863730', data = '{ \"data\": { \"current_condition\": [ {\"cloudcover\": \"0\", \"humidity\": \"70\", \"observation_time\": \"06:55 AM\", \"precipMM\": \"0.0\", \"pressure\": \"1016\", \"temp_C\": \"18\", \"temp_F\": \"65\", \"visibility\": \"16\", \"weatherCode\": \"113\", \"weatherDesc\": [ {\"value\": \"Clear\" } ], \"weatherIconUrl\": [ {\"value\": \"http:\\/\\/www.worldweatheronline.com\\/images\\/wsymbols01_png_64\\/wsymbol_0008_clear_sky_night.png\" } ], \"winddir16Point\": \"S\", \"winddirDegree\": \"190\", \"windspeedKmph\": \"7\", \"windspeedMiles\": \"4\" } ], \"request\": [ {\"query\": \"Anaheim, United States Of America\", \"type\": \"City\" } ], \"weather\": [ {\"date\": \"2013-05-17\", \"precipMM\": \"0.0\", \"tempMaxC\": \"25\", \"tempMaxF\": \"77\", \"tempMinC\": \"15\", \"tempMinF\": \"58\", \"weatherCode\": \"113\", \"weatherDesc\": [ {\"value\": \"Sunny\" } ], \"weatherIconUrl\": [ {\"value\": \"http:\\/\\/www.worldweatheronline.com\\/images\\/wsymbols01_png_64\\/wsymbol_0001_sunny.png\" } ], \"winddir16Point\": \"W\", \"winddirDegree\": \"280\", \"winddirection\": \"W\", \"windspeedKmph\": \"20\", \"windspeedMiles\": \"13\" }, {\"date\": \"2013-05-18\", \"precipMM\": \"0.0\", \"tempMaxC\": \"25\", \"tempMaxF\": \"77\", \"tempMinC\": \"16\", \"tempMinF\": \"60\", \"weatherCode\": \"113\", \"weatherDesc\": [ {\"value\": \"Sunny\" } ], \"weatherIconUrl\": [ {\"value\": \"http:\\/\\/www.worldweatheronline.com\\/images\\/wsymbols01_png_64\\/wsymbol_0001_sunny.png\" } ], \"winddir16Point\": \"SW\", \"winddirDegree\": \"227\", \"winddirection\": \"SW\", \"windspeedKmph\": \"19\", \"windspeedMiles\": \"12\" }, {\"date\": \"2013-05-19\", \"precipMM\": \"0.0\", \"tempMaxC\": \"21\", \"tempMaxF\": \"69\", \"tempMinC\": \"16\", \"tempMinF\": \"60\", \"weatherCode\": \"113\", \"weatherDesc\": [ {\"value\": \"Sunny\" } ], \"weatherIconUrl\": [ {\"value\": \"http:\\/\\/www.worldweatheronline.com\\/images\\/wsymbols01_png_64\\/wsymbol_0001_sunny.png\" } ], \"winddir16Point\": \"WNW\", \"winddirDegree\": \"300\", \"winddirection\": \"WNW\", \"windspeedKmph\": \"8\", \"windspeedMiles\": \"5\" }, {\"date\": \"2013-05-20\", \"precipMM\": \"0.0\", \"tempMaxC\": \"22\", \"tempMaxF\": \"71\", \"tempMinC\": \"16\", \"tempMinF\": \"60\", \"weatherCode\": \"122\", \"weatherDesc\": [ {\"value\": \"Overcast\" } ], \"weatherIconUrl\": [ {\"value\": \"http:\\/\\/www.worldweatheronline.com\\/images\\/wsymbols01_png_64\\/wsymbol_0004_black_low_cloud.png\" } ], \"winddir16Point\": \"W\", \"winddirDegree\": \"280\", \"winddirection\": \"W\", \"windspeedKmph\": \"5\", \"windspeedMiles\": \"3\" } ] }}'
[execution_time] => 0.10627913475037
)
[6] => Array
(
[mysql_query] => SELECT *, ( 3959 * acos( cos( radians(33.835916) ) * cos( radians( merch_latitude ) ) * cos( radians( merch_longitude ) - radians(-117.908583) ) + sin( radians(33.835916) ) * sin( radians( merch_latitude ) ) ) ) AS distance
FROM merchants_local
HAVING distance < 10
ORDER BY distance
[execution_time] => 0.014867782592773
)
[7] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '159830' ORDER BY item_per_off
[execution_time] => 0.009566068649292
)
[8] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '254213' ORDER BY item_per_off
[execution_time] => 0.010489940643311
)
[9] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '131653' ORDER BY item_per_off
[execution_time] => 0.0070068836212158
)
[10] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '163656' ORDER BY item_per_off
[execution_time] => 0.010197162628174
)
[11] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '158914' ORDER BY item_per_off
[execution_time] => 0.0078418254852295
)
[12] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '165775' ORDER BY item_per_off
[execution_time] => 0.011466979980469
)
[13] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '161948' ORDER BY item_per_off
[execution_time] => 0.0095510482788086
)
[14] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '258040' ORDER BY item_per_off
[execution_time] => 0.0070500373840332
)
[15] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '125895' ORDER BY item_per_off
[execution_time] => 0.0073249340057373
)
[16] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '156148' ORDER BY item_per_off
[execution_time] => 0.011373043060303
)
[17] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '154542' ORDER BY item_per_off
[execution_time] => 0.0070040225982666
)
[18] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '153394' ORDER BY item_per_off
[execution_time] => 0.0069980621337891
)
[19] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '338703' ORDER BY item_per_off
[execution_time] => 0.008587121963501
)
[20] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '162743' ORDER BY item_per_off
[execution_time] => 0.01117992401123
)
[21] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '338871' ORDER BY item_per_off
[execution_time] => 0.010869979858398
)
[22] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '167025' ORDER BY item_per_off
[execution_time] => 0.0086619853973389
)
)
)
)