我的代码如下:
$sql="update xxx set osid = '$getId' and IP = '$getIp' and encryption = '$getEncryption' where UserName ='$user'";
执行后发现不行,反而把我这些数据全部变空了
我的代码如下:
$sql="update xxx set osid = '$getId' and IP = '$getIp' and encryption = '$getEncryption' where UserName ='$user'";
执行后发现不行,反而把我这些数据全部变空了
更新多个字段用逗号隔开,and和or主要用在where筛选
$sql="update xxx set osid = '$getId' ,IP = '$getIp' ,encryption = '$getEncryption' where UserName ='$user'";