mysql 中自定义变量排序

  $temporary1 = DB::select(‘select hair_bbs_article.*,hair_member.nickname,hair_member.headphoto,‘

                .‘ (‘.$articleSort.‘ +(hair_bbs_article.order * ‘.$tenDayTime.‘)) as order1 from hair_bbs_article‘

                .‘ left join hair_member on hair_bbs_article.mid = hair_member.mid‘

                .‘ where(hair_bbs_article.examine = 1  and hair_bbs_article.deleted_at is null and hair_bbs_article.announcement = 0‘

                .‘ and hair_bbs_article.stick_date = 0‘

                . $creamSql

                .‘ and hair_bbs_article.pid = ‘.$pid.‘)‘

                .‘ order by order1 desc‘

                .‘ limit ‘.$page_number.‘,‘.$page_size);

郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。