86400*20 ); // backend options $backendOptions = array( 'cache_dir' => 'cache' // Directory where to put the cache files ); // make object $cache = Zend_Cache::factory('Output', 'File', $frontendOptions, $backendOptions); // make an id $cacheID='area_bt_oneutamadamansara_483882_homestays'; // everything before this is not cached if (!($cache->start($cacheID))) { // begin cache include($_SERVER['DOCUMENT_ROOT'].'/dbinfo.inc.php'); $mysqli=mysqli_connect('localhost',$username,$password,$database); mysqli_set_charset($mysqli,"utf8"); if (mysqli_connect_errno($mysqli)) { trigger_error( 'Database connection failed: ' . mysqli_connect_error(), E_USER_ERROR); } $query="SELECT ahotels.area_name, area_name2, ahotels.area_name_path, ahotels.city_id, city_name, city_links, city_name_lower, city_name_path, agoda_cities.city_recommended, ad1_url, country_id, country_name, country_name_lower, img2, map, state_name, state_name_lower, continent_name, continent_name_lower FROM ahotels LEFT JOIN agoda_cities ON ahotels.city_id = agoda_cities.city_id LEFT JOIN ahotels_img ON ahotels.hotel_id = ahotels_img.hotel_id LEFT JOIN agoda_areasx ON ahotels.area_id = agoda_areasx.area_id WHERE ahotels.area_name_path='asiahotels/malaysiahotels/kualalumpurhotels/oneutamadamansarahotels' AND ahotels.accommodation_type = 'Homestay' ORDER BY img2, user_rating_average, user_rating_average > 9.2 LIMIT 1"; $result = mysqli_query($mysqli,$query) or trigger_error("Query Failed! SQL: $query - Error: ". mysqli_error($mysqli), E_USER_ERROR); while($row = mysqli_fetch_assoc($result)) { $ad1_url = $row['ad1_url']; $map = $row['map']; $img2 = $row['img2']; $area_name2 = $row['area_name2']; $area_name = $row['area_name']; $area_name_path = $row['area_name_path']; $city_recommended = $row['city_recommended']; $city_links = $row['city_links']; $city_name = $row['city_name']; $city_name_lower = $row['city_name_lower']; $city_name_path = $row['city_name_path']; $country_name = $row['country_name']; $state_name = $row['state_name']; $state_name_lower = $row['state_name_lower']; $continent_name = $row['continent_name']; $country_name_lower = $row['country_name_lower']; $continent_name_lower = $row['continent_name_lower']; $city_id = $row['city_id']; $country_id = $row['country_id']; $accommodation_type = 'Homestay'; $accommodation_type_plur = 'Homestays'; $area_by_type_name_path = 'asiahotels/malaysiahotels/kualalumpurhotels/oneutamadamansarahomestays'; $city_by_type_name_path = 'asiahotels/malaysiahotels/kualalumpurhotels/kualalumpurhomestays'; if(!empty($area_name2)) : $area_name = $area_name2; else : $area_name = $row['area_name']; endif; include($_SERVER['DOCUMENT_ROOT'].'/fluidarea_by_type2.php');} // end cache $cache->end(); } // everything after this is not cached ?>