我正在使用cakePHP V2.0.2
我遇到了麻烦
$this->paginate = array( "fields" => array( "Player.join_country" ),"joins" => array( array( "table" => "banner_key_current_ext","alias" => "BannerKeyCurrentExt","type" => "inner","conditions" => "BannerKeyCurrentExt.banner_key_id = BannerKeyCurrent.banner_key_id" ),array( "table" => "players","alias" => "Player","conditions" => "BannerKeyCurrentExt.identifier = Player.zban_player_id" . $country_condition ),array( "table" => "users","alias" => "User","conditions" => "BannerKeyCurrent.user_id = User.user_id" ),array( "table" => "tag_links","alias" => "TagLinks","conditions" => "TagLinks.id = BannerKeyCurrent.user_id AND TagLinks.tag_id = 710" ) ),"conditions" => array( "BannerKeyCurrent.date BETWEEN ? AND ?" => array( $this->request->query["period_from"],$this->request->query["period_to"] ),"BannerKeyCurrent.plan_id" => $brands_plan_map[$this->request->query["brand"]]["plans"],"BannerKeyCurrent.operation_id" => $operation_ids ),"group" => array( "Player.join_country" ),"order" => array( "Player.join_country" => "DESC" ),"limit" => 999999,"maxLimit" => 999999 );
一切都适用于所有领域,联接,组,限制没有问题,但订单简单不会工作.输出SQL_dump元素表明它永远不会添加到查询中.
任何帮助将不胜感激.
谢谢
通过做
原文链接:https://www.f2er.com/php/137406.html"order" => "Player.join_country DESC"
为我工作.
我希望它也能帮到你.