Please ask the editor for the corresponding update.
Synn
Synn 2021-03-17 22:53:34
0
7
1430

The modification is successful. The normal number of affected rows printed in Sysdb.php is 1. The corresponding $res in admin.php = $this->db->table('admins')->where( ['id'=>$id])->update($data);var_dump($res);

The return is always NULL. Does anyone know what's going on? Please advise, thank you!

Synn
Synn

reply all(3)
尽管如此,世界依旧美丽

QQ图片20210222145709.png Support the same request!

  • reply Did I forget to return in Sysdb?
    Synn author 2021-03-20 20:38:46
Pluto.

$res = $this->db->table('admins')->where('id',$id)->update($data); Try this

  • reply Neither method works. In this answer, if the modification is unsuccessful, the log returns UPDATE `admins` SET `username` = 'admin' , `gid` = 2 , `truename` = 'Mark' , `status` = 1 , `password` = '21232f297a57a5a743894a0e4a801fc3' WHERE `id` IS NULL [ RunTime:0.000270s ], the result is NULL
    Synn author 2021-03-18 21:30:12
  • reply Finally found the reason, thank you! !
    Synn author 2021-03-18 22:21:06
Pluto.

$res = $this->db->table('admins')->where(['id',$id)->update($data); Try this

  • reply This method reports POST http://www.aqiyi.cn/admins.php/admins/admin/save 500 (Internal Server Error), and the log reports [ error ] [0] Query expression error: 'id'[ C:\PHP\WWW\video\thinkphp\library\think\db\Builder.php:309], the modification is also unsuccessful. Both array(=>) and [=>] can be modified successfully, but only in admin.php The return value is NULL, and Sydb returns 1.
    Synn author 2021-03-18 21:36:00
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template