【发布时间】:2018-08-05 02:52:25
【问题描述】:
我运行这段代码:
$id = 1;
$email = 'email@gmail.com';
$user = DB::table('users')->where([
['id', '=', $id],
['email', '=', $email]
])->toSql();
dd($user);
但是查询生成器打印是:
select * from `users` where (`id` = ? and `email` = ?)
为什么不打印是:
select * from `users` where (`id` = 1 and `email` = email@gmail.com)
【问题讨论】:
标签: mysql laravel query-builder