// $users = DB::select('select * from q_ad');
// 查询所有数据
// $users = DB::table('ad')->get();
// $log = DB::getQueryLog();
// var_dump($users);
//查询第一条记录
$usersOne = DB::table('ad')->where('ad_id','3471')->first();
// var_dump($usersOne);
//只获取ad_sign字段的值
$usersOne = DB::table('ad')->where('ad_id','3466')->value('ad_sign');
// var_dump($usersOne);
//获取部分字段
$usersOne = DB::table('ad')->where('ad_id','3466')->select('ad_sign','ad_img')->get();
// var_dump($usersOne);
//排序
$usersOne = DB::table('ad')->select('ad_sign','ad_img')->orderBy('ad_id','desc')->limit(10)->get();
// var_dump($usersOne);
//分页
$usersOne = DB::table('ad')->select('ad_sign','ad_img')->orderBy('ad_id','desc')->limit(10)->offset(20)->get();
var_dump($usersOne);