<?php 
session_start();
include_once '../../conexao/index.php';
error_reporting(E_ALL);
date_default_timezone_set('Africa/Maputo');
$data_hora = date("Y-m-d H:i:s");

/*Variaveis do Sistema*/
/*********************************************/
$userID = $_SESSION['idUsuario'] ?? null;
$userNOME = $_SESSION['nomeUsuario'] ?? null;
$userCATE = $_SESSION['categoriaUsuario'] ?? null;
/*********************************************/

$mesa = $_POST['mesa'];
$datas = $_POST['datas'];
$hora = $_POST['hora'];

$sql = "UPDATE pos_mesas_temp_artigos SET pronto = 1 WHERE cat_prod = 3 AND mesa = ? AND DATE(data) = ? AND DATE_FORMAT(data, '%H:%i') = ?";
$stmt = mysqli_prepare($db, $sql);
mysqli_stmt_bind_param($stmt, "iss", $mesa,$datas, $hora);
mysqli_stmt_execute($stmt);