1
I need to change all fields of a table and only insert another result into a row. I am using the following code
$Nid = intval($_GET['Nid']);
$sql = "UPDATE * FROM programacao SET status='offline' WHERE status ='online' ";
$sql2 = "UPDATE programacao SET status='online' WHERE Nid = :Nid";
try {
$stmt = $DB->prepare($sql);
$stmt = $DB->prepare($sql2);
$stmt->bindValue(":Nid", $Nid);
$stmt->execute();
The code is working but only executes the second query.
I did exactly option 2, it worked perfect worth
– Arsom Nolasco