query($"/> query($">
Rumah >pembangunan bahagian belakang >tutorial php > php执行mysql语句有关问题
php执行mysql语句问题
$id=1; 这个是确定没问题
这个执行就错误
$sql="update admin set pass='$pass1' where id=$id;";
$mysql=new MysqlHelper();
$count=$mysql->query($sql);
$mysql.close();
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
这个执行就正确
$sql="update admin set pass='$pass1' where id=1;";‘
$mysql=new MysqlHelper();
$count=$mysql->query($sql);
$mysql.close();