我有两个声明更新在我的查询,但只有一个工程。 我想评论的第一个工作尝试的第一个。 当我 dd
这回是真的,但该表并不会更新。 可以有人告诉我我应该怎么做? 感谢
这里是查询
$q = "UPDATE data_file SET
file_name=?,file_size=?
WHERE module_id = ". $this->module_id;
$date = date('Y-m-d H:i:s');
$updateStmt = $this->conn->prepare($q);
$updateStmt->execute([
$this->file_name,
$this->file_size,
]);
//this query returns true but not updating the database
$q1 = "UPDATE server_status SET file_start = ? AND gps_start = ? WHERE module_id = ". $this->module_id;
$updateStmnt2 = $this->conn->prepare($q1);
$stat = $updateStmnt2->execute([
1,
$date
]);
//query 2 end
Responses::http_ok();