0
I’m taking a beating with a variable update. Please someone can help me?
$servidorBanco = "localhost";
$usuarioBanco = "root";
$senhaBanco = "";
$dadosBanco = "db";
$conexao = new mysqli($servidorBanco, $usuarioBanco, $senhaBanco, $dadosBanco);
date_default_timezone_set('America/Sao_Paulo');
$hora = date('H:i:s');
$idHost = 1;
$consulta2 = $conexao->escape_string("UPDATE host SET uptimeHost='".$hora."', avisoHost=0 WHERE idHost='".$idHost);
$resultado4 = $conexao->query($consulta2);
Not updating in Mysql database.
Does what the
iPramesPortas
suggested, but first check if your SQL query is correct. Make aecho
in SQL and test it in your database.– Max Rogério
I’ve solved the problem, thank you.
– Wesley Rodrigues