if (isset($post_array["order"]) && $post_array["order"]) { $order_by = " order by " . $post_array["order"]; } else { $current_hour = date('H'); $order_by = " order by RAND($current_hour)"; } hocam bu random ile karıştırabilirsiniz
sayfayı yeniledikçe random oluyor peki hocam bu kodu nasıl saatlik random yapabilirim,
public function getFeatured($no_random)
{
global $db;
global $settings;
$locations_str = "";
if( $settings["enable_locations"] )
{
$locations_str = locations::makeQueryStr();
}
$where = "where " . TABLE_ADS . ".featured=1 and " . TABLE_ADS . ".active = 1" . $where . $locations_str;
$order_by_str = "order by rand()";
$order_way = "";
$start = 0;
$ads_per_page = $no_random;
$result = $this->getShortListings($where, $order_by_str, $order_way, $start, $ads_per_page);
return $result;
}