码迷,mamicode.com
首页 > 数据库 > 详细

mysql 中自定义变量排序

时间:2015-05-13 14:45:56      阅读:351      评论:0      收藏:0      [点我收藏+]

标签: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);

mysql 中自定义变量排序

标签:mysql 排序

原文地址:http://blog.csdn.net/huihuangjiuai/article/details/45692715

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!