关于查询构造器 orderBy 问题


需求如下:

select * from A where id = a orderby x desc, y desc limit z;

# 文档只有这种固定的
$users = DB::table('users')
                ->orderBy('name', 'desc')
                ->get();

# 如果 x && y 是可以变的
# 我该如何构造我的查询构造器,让他满足上述sql




点赞 取消点赞 收藏 取消收藏

<< 上一篇: 请问PHP7.2 ZEND内核中如何获取类定义的常量?

>> 下一篇: Symfony\Component\HttpKernel\Exception\NotFoundHttpException in /data/www/billings/vendor/laravel/framework/src/Illuminate/Routing/RouteCollection.php:179 Stack trace: #0