Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/mysql/67.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/templates/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 不正确的时间戳值Laravel DB_Php_Mysql_Database_Laravel_Scheduler - Fatal编程技术网

Php 不正确的时间戳值Laravel DB

Php 不正确的时间戳值Laravel DB,php,mysql,database,laravel,scheduler,Php,Mysql,Database,Laravel,Scheduler,我在localhost上设置了一个laravel项目,我在调度程序中创建了一个命令,如下所示: DB::table('relic')->where('created_at',”该库包含在Laravel中,是处理日期和时间的“标准”方式。您可以按如下方式编写查询: DB::table('relic') ->where('created_at', '<', \Carbon\Carbon::now()->subMonth()) ->delete(); DB::tabl

我在localhost上设置了一个laravel项目,我在调度程序中创建了一个命令,如下所示:

DB::table('relic')->where('created_at',”该库包含在Laravel中,是处理日期和时间的“标准”方式。您可以按如下方式编写查询:

DB::table('relic')
  ->where('created_at', '<', \Carbon\Carbon::now()->subMonth())
  ->delete();
DB::table('relic')
->其中('created_at','
DB::table('relic')
  ->whereRaw('created_at < NOW() - INTERVAL 1 MONTH')
  ->delete();