|
|
- $where = [
- 'is_finance' => 2,
- 'status' => -2,
- 'refund_status' => 2,
- 'add_time' => 2,
- ['add_time', '<', 123456789]
- ];
- $query = self::where($where);
- $sql = $query->toSql();
- $bindings = $query->getBindings();
- $results = $query->get();
- $full_sql = vsprintf(str_replace('?', '%s', $sql), collect($bindings)->map(function ($binding) {
- return is_numeric($binding) ? $binding : "'{$binding}'";
- })->toArray());
- dd($full_sql, $results);
复制代码
|
|