Mam dwa operatora aktualizacji w moim zapytaniu, ale działa tylko jeden. Próbowałem skomentować pierwszy, który działa, aby spróbować drugi. Kiedy dd
zwraca wartość true, ale tabela nie jest aktualizowany. Może mi ktoś powiedzieć, co mam zrobić? Dziękuję
Oto wnioski
$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();