还是不行,有新的错误 TypeError: think\db\BaseQuery::parseUpdateData(): Argument #1 ($data) must be of type array, null given, called in C:\Users\DELL\Desktop\phpEnv\www\yingbiao_webman\webman\vendor\topthink\think-orm\src\db\BaseQuery.php on line 1440 and defined in C:\Users\DELL\Desktop\phpEnv\www\yingbiao_webman\webman\vendor\topthink\think-orm\src\db\BaseQuery.php:1654
更新到 2.1.11 或者后续更高版本
好的,感谢
还是不行,有新的错误 TypeError: think\db\BaseQuery::parseUpdateData(): Argument #1 ($data) must be of type array, null given, called in C:\Users\DELL\Desktop\phpEnv\www\yingbiao_webman\webman\vendor\topthink\think-orm\src\db\BaseQuery.php on line 1440 and defined in C:\Users\DELL\Desktop\phpEnv\www\yingbiao_webman\webman\vendor\topthink\think-orm\src\db\BaseQuery.php:1654
给一个重现错误的代码例子
$threadinfo = ForumThread::where('id','=',$fid)->find();
$threadinfo->isAutoWriteTimestamp(false)->setInc('view_number', 1, 600);
tp应该是不支持你这在结果集上调用setInc(),我用thinkphp 8 也是一样的错误。
下面这种写法是可以的
好的,谢谢