Workerman/MySQL的update无法更新

0

更新例句:


$row = $MDB->update('connect_wx')->cols(array(
"nickname"=>$data['nickName'],
"gender"=>$data['gender'],
"language"=>$data['language'],
"city"=>$data['city'],
"province"=>$data['province'],
"country"=>$data['country'],
"avatarurl"=>$data['avatarUrl']
))->where('openid= :openid')->bindValues(array("openid"=>$data['openId']))->query();

服务器信息:


Server CenterOS 8
Workerman version:4.0.4
PHP version:7.4.6
MySQL 8.0.20


问题


插入可以,就是更新会出现问题,无法更新,$row是0

已邀请:

AccessDenied - 90后IT

赞同来自:

$MDB->update('connect_wx')->cols(array(
"nickname"=>$data['nickName'],
"gender"=>$data['gender'],
"language"=>$data['language'],
"city"=>$data['city'],
"province"=>$data['province'],
"country"=>$data['country'],
"avatarurl"=>$data['avatarUrl']
))->where('openid= :openid')->bindValue("openid",$data['openId'])->query();

更新没有问题,是数据没有变化,所以updatedAt 的 CURRENT_TIMESTAMP 没有更新

要回复问题请先登录注册