0
I am reformulating a system of a client and the same is using procedural mode in login and not PDO, but to give more security, I used the sprintf
, but it’s not working. Look:
$sql = sprintf(
"SELECT *, DATE_FORMAT(DataAcesso,'%d/%m/%Y') AS DataDeAcesso,
DATE_FORMAT(DataAcesso,'%H:%i') AS HoraDeAcesso
FROM loja_admin WHERE EmailAdmin = '%s' AND SenhaAdmin = '%s'",
mysqli_real_escape_string($this->conexao, $loginUsuario),
mysqli_real_escape_string($this->conexao, $codificado)
);
$query = mysqli_query($this->conexao, $sql);
And when I give one echo
in the variable $sql
, nothing appears. But when I take the DATE_FORMAT()
, works. I would have some way to solve this?
thanks gmsantos. I’ll take a look at the documentations.
– user24136