<?php
// Buscar logs do cliente com tenant_id
$sqlLogs = "SELECT * FROM cliente_logs WHERE cliente_id = ? AND tenant_id = ? ORDER BY id DESC";
$stmtLogs = $conn->prepare($sqlLogs);
$stmtLogs->bind_param("is", $clienteId, $tenant_id); // 's' para string (char(36))
$stmtLogs->execute();
$resultadoLogs = $stmtLogs->get_result();
$logs = $resultadoLogs->fetch_all(MYSQLI_ASSOC);
$stmtLogs->close();
?>