Array
(
[0] => Array
(
[api_query] => http://api.salecamel.com?api_key=123456789&do_get=local_locations
[execution_time] => 0.14773607254028
[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.061633110046387
)
)
)
[1] => Array
(
[api_query] => http://api.salecamel.com?api_key=123456789&do_get=get_local&location=Patchogue%2C+NY%2C+US&radius=10&search_limit=15
[execution_time] => 9.0772891044617
[from_api] => Array
(
[0] => Array
(
[mysql_query] => SELECT merch_latitude, merch_longitude
FROM merchants_local
WHERE merch_locality='Patchogue' AND merch_region='NY'
[execution_time] => 0.0057640075683594
)
[1] => Array
(
[news_api_call] => http://hyperlocal-api.outside.in/v1.1/states/NY/cities/Patchogue/stories?dev_key=6at3bn2z23e33eu92utrq6pt&sig=239441516e25a82ccee4e8f906b99455&no-vertical=obituaries
)
[2] => Array
(
[mysql_query] => SELECT data FROM cache_news
WHERE locality = 'Patchogue'
AND region = 'NY'
AND country = 'United States'
AND expires > '1369243221'
[execution_time] => 0.00040602684020996
)
[3] => Array
(
[mysql_query] => INSERT INTO cache_news
(`locality`, `region`, `country`, `expires`, `data`)
VALUES
(
'Patchogue',
'NY',
'United States',
'1369246821',
'{\"links\":{\"last\":\"http://hyperlocal-api.outside.in/v1.1/states/NY/cities/Patchogue/stories?no-vertical=obituaries&page=1&dev_key=6at3bn2z23e33eu92utrq6pt&sig=239441516e25a82ccee4e8f906b99455\",\"first\":\"http://hyperlocal-api.outside.in/v1.1/states/NY/cities/Patchogue/stories?no-vertical=obituaries&page=1&dev_key=6at3bn2z23e33eu92utrq6pt&sig=239441516e25a82ccee4e8f906b99455\"},\"total\":0,\"location\":{\"display_name\":\"Patchogue, NY\",\"state\":\"New York\",\"url\":\"http://outside.in/patchogue-ny?utm_content=Patchogue_NY&utm_source=API_OutsideIn_0&utm_medium=API&utm_campaign=APILinkback\",\"lng\":-73.0186538696289,\"lat\":40.76219177246094,\"uuid\":\"414aa8c1-28b5-4ebe-b6c1-810671975be8\",\"city\":\"Patchogue\",\"category\":{\"name\":\"city\",\"display_name\":\"City / Town / Village\"},\"state_abbrev\":\"NY\",\"url_name\":\"patchogue-ny\",\"hot_for_requested\":false},\"stories\":[]}'
)
ON DUPLICATE KEY UPDATE expires = '1369246821', data = '{\"links\":{\"last\":\"http://hyperlocal-api.outside.in/v1.1/states/NY/cities/Patchogue/stories?no-vertical=obituaries&page=1&dev_key=6at3bn2z23e33eu92utrq6pt&sig=239441516e25a82ccee4e8f906b99455\",\"first\":\"http://hyperlocal-api.outside.in/v1.1/states/NY/cities/Patchogue/stories?no-vertical=obituaries&page=1&dev_key=6at3bn2z23e33eu92utrq6pt&sig=239441516e25a82ccee4e8f906b99455\"},\"total\":0,\"location\":{\"display_name\":\"Patchogue, NY\",\"state\":\"New York\",\"url\":\"http://outside.in/patchogue-ny?utm_content=Patchogue_NY&utm_source=API_OutsideIn_0&utm_medium=API&utm_campaign=APILinkback\",\"lng\":-73.0186538696289,\"lat\":40.76219177246094,\"uuid\":\"414aa8c1-28b5-4ebe-b6c1-810671975be8\",\"city\":\"Patchogue\",\"category\":{\"name\":\"city\",\"display_name\":\"City / Town / Village\"},\"state_abbrev\":\"NY\",\"url_name\":\"patchogue-ny\",\"hot_for_requested\":false},\"stories\":[]}'
[execution_time] => 0.21424388885498
)
[4] => Array
(
[mysql_query] => SELECT data FROM cache_weather
WHERE locality = 'Patchogue'
AND region = 'NY'
AND country = 'United States'
AND expires > '1369243221'
[execution_time] => 0.0005338191986084
)
[5] => Array
(
[mysql_query] => INSERT INTO cache_weather
(`locality`, `region`, `country`, `expires`, `data`)
VALUES
(
'Patchogue',
'NY',
'United States',
'1369246821',
'{ \"data\": { \"current_condition\": [ {\"cloudcover\": \"100\", \"humidity\": \"78\", \"observation_time\": \"05:20 PM\", \"precipMM\": \"0.2\", \"pressure\": \"1013\", \"temp_C\": \"21\", \"temp_F\": \"70\", \"visibility\": \"6\", \"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\": \"Patchogue, United States Of America\", \"type\": \"City\" } ], \"weather\": [ {\"date\": \"2013-05-22\", \"precipMM\": \"2.8\", \"tempMaxC\": \"21\", \"tempMaxF\": \"70\", \"tempMinC\": \"18\", \"tempMinF\": \"64\", \"weatherCode\": \"122\", \"weatherDesc\": [ {\"value\": \"Overcast\" } ], \"weatherIconUrl\": [ {\"value\": \"http:\\/\\/www.worldweatheronline.com\\/images\\/wsymbols01_png_64\\/wsymbol_0004_black_low_cloud.png\" } ], \"winddir16Point\": \"SSW\", \"winddirDegree\": \"200\", \"winddirection\": \"SSW\", \"windspeedKmph\": \"22\", \"windspeedMiles\": \"14\" }, {\"date\": \"2013-05-23\", \"precipMM\": \"1.5\", \"tempMaxC\": \"20\", \"tempMaxF\": \"68\", \"tempMinC\": \"17\", \"tempMinF\": \"62\", \"weatherCode\": \"143\", \"weatherDesc\": [ {\"value\": \"Mist\" } ], \"weatherIconUrl\": [ {\"value\": \"http:\\/\\/www.worldweatheronline.com\\/images\\/wsymbols01_png_64\\/wsymbol_0006_mist.png\" } ], \"winddir16Point\": \"S\", \"winddirDegree\": \"190\", \"winddirection\": \"S\", \"windspeedKmph\": \"31\", \"windspeedMiles\": \"19\" }, {\"date\": \"2013-05-24\", \"precipMM\": \"55.4\", \"tempMaxC\": \"20\", \"tempMaxF\": \"68\", \"tempMinC\": \"9\", \"tempMinF\": \"48\", \"weatherCode\": \"143\", \"weatherDesc\": [ {\"value\": \"Mist\" } ], \"weatherIconUrl\": [ {\"value\": \"http:\\/\\/www.worldweatheronline.com\\/images\\/wsymbols01_png_64\\/wsymbol_0006_mist.png\" } ], \"winddir16Point\": \"S\", \"winddirDegree\": \"180\", \"winddirection\": \"S\", \"windspeedKmph\": \"37\", \"windspeedMiles\": \"23\" }, {\"date\": \"2013-05-25\", \"precipMM\": \"2.8\", \"tempMaxC\": \"19\", \"tempMaxF\": \"65\", \"tempMinC\": \"10\", \"tempMinF\": \"50\", \"weatherCode\": \"113\", \"weatherDesc\": [ {\"value\": \"Sunny\" } ], \"weatherIconUrl\": [ {\"value\": \"http:\\/\\/www.worldweatheronline.com\\/images\\/wsymbols01_png_64\\/wsymbol_0001_sunny.png\" } ], \"winddir16Point\": \"NW\", \"winddirDegree\": \"319\", \"winddirection\": \"NW\", \"windspeedKmph\": \"45\", \"windspeedMiles\": \"28\" } ] }}'
)
ON DUPLICATE KEY UPDATE expires = '1369246821', data = '{ \"data\": { \"current_condition\": [ {\"cloudcover\": \"100\", \"humidity\": \"78\", \"observation_time\": \"05:20 PM\", \"precipMM\": \"0.2\", \"pressure\": \"1013\", \"temp_C\": \"21\", \"temp_F\": \"70\", \"visibility\": \"6\", \"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\": \"Patchogue, United States Of America\", \"type\": \"City\" } ], \"weather\": [ {\"date\": \"2013-05-22\", \"precipMM\": \"2.8\", \"tempMaxC\": \"21\", \"tempMaxF\": \"70\", \"tempMinC\": \"18\", \"tempMinF\": \"64\", \"weatherCode\": \"122\", \"weatherDesc\": [ {\"value\": \"Overcast\" } ], \"weatherIconUrl\": [ {\"value\": \"http:\\/\\/www.worldweatheronline.com\\/images\\/wsymbols01_png_64\\/wsymbol_0004_black_low_cloud.png\" } ], \"winddir16Point\": \"SSW\", \"winddirDegree\": \"200\", \"winddirection\": \"SSW\", \"windspeedKmph\": \"22\", \"windspeedMiles\": \"14\" }, {\"date\": \"2013-05-23\", \"precipMM\": \"1.5\", \"tempMaxC\": \"20\", \"tempMaxF\": \"68\", \"tempMinC\": \"17\", \"tempMinF\": \"62\", \"weatherCode\": \"143\", \"weatherDesc\": [ {\"value\": \"Mist\" } ], \"weatherIconUrl\": [ {\"value\": \"http:\\/\\/www.worldweatheronline.com\\/images\\/wsymbols01_png_64\\/wsymbol_0006_mist.png\" } ], \"winddir16Point\": \"S\", \"winddirDegree\": \"190\", \"winddirection\": \"S\", \"windspeedKmph\": \"31\", \"windspeedMiles\": \"19\" }, {\"date\": \"2013-05-24\", \"precipMM\": \"55.4\", \"tempMaxC\": \"20\", \"tempMaxF\": \"68\", \"tempMinC\": \"9\", \"tempMinF\": \"48\", \"weatherCode\": \"143\", \"weatherDesc\": [ {\"value\": \"Mist\" } ], \"weatherIconUrl\": [ {\"value\": \"http:\\/\\/www.worldweatheronline.com\\/images\\/wsymbols01_png_64\\/wsymbol_0006_mist.png\" } ], \"winddir16Point\": \"S\", \"winddirDegree\": \"180\", \"winddirection\": \"S\", \"windspeedKmph\": \"37\", \"windspeedMiles\": \"23\" }, {\"date\": \"2013-05-25\", \"precipMM\": \"2.8\", \"tempMaxC\": \"19\", \"tempMaxF\": \"65\", \"tempMinC\": \"10\", \"tempMinF\": \"50\", \"weatherCode\": \"113\", \"weatherDesc\": [ {\"value\": \"Sunny\" } ], \"weatherIconUrl\": [ {\"value\": \"http:\\/\\/www.worldweatheronline.com\\/images\\/wsymbols01_png_64\\/wsymbol_0001_sunny.png\" } ], \"winddir16Point\": \"NW\", \"winddirDegree\": \"319\", \"winddirection\": \"NW\", \"windspeedKmph\": \"45\", \"windspeedMiles\": \"28\" } ] }}'
[execution_time] => 0.35453605651855
)
[6] => Array
(
[mysql_query] => SELECT *, ( 3959 * acos( cos( radians(40.762199) ) * cos( radians( merch_latitude ) ) * cos( radians( merch_longitude ) - radians(-73.011177) ) + sin( radians(40.762199) ) * sin( radians( merch_latitude ) ) ) ) AS distance
FROM merchants_local
HAVING distance < 10
ORDER BY distance
[execution_time] => 0.019850969314575
)
[7] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '135499' ORDER BY item_per_off
[execution_time] => 0.007422924041748
)
[8] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '260196' ORDER BY item_per_off
[execution_time] => 0.01164984703064
)
[9] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '339035' ORDER BY item_per_off
[execution_time] => 0.0074751377105713
)
[10] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '164906' ORDER BY item_per_off
[execution_time] => 0.012350082397461
)
[11] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '145741' ORDER BY item_per_off
[execution_time] => 0.011750936508179
)
[12] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '127589' ORDER BY item_per_off
[execution_time] => 0.0083720684051514
)
[13] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '131372' ORDER BY item_per_off
[execution_time] => 0.008652925491333
)
[14] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '333084' ORDER BY item_per_off
[execution_time] => 0.012298822402954
)
[15] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '159276' ORDER BY item_per_off
[execution_time] => 0.011198043823242
)
[16] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '338113' ORDER BY item_per_off
[execution_time] => 0.012222051620483
)
[17] => Array
(
[mysql_query] => SELECT * FROM items_local WHERE merch_id = '134159' ORDER BY item_per_off
[execution_time] => 0.010584115982056
)
)
)
)