Ho due istruzione update nella mia query, Ma solo uno funziona. Ho provato a commentare il primo che funziona per provare il secondo. Quando ho dd
restituisce vero, ma la tabella non è aggiornata. Qualcuno può dirmi cosa devo fare? Grazie
Qui ci sono le query
$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();