I need to change all the fields in a table and insert only one row in another 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.