SHARE
TWEET

Untitled

a guest Mar 20th, 2017 56 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $sql = sprintf(
  2.     "SELECT *, DATE_FORMAT(DataAcesso,'%d/%m/%Y') AS DataDeAcesso,
  3.     DATE_FORMAT(DataAcesso,'%H:%i') AS HoraDeAcesso
  4.     FROM loja_admin WHERE EmailAdmin = '%s' AND SenhaAdmin = '%s'",
  5.     mysqli_real_escape_string($this->conexao, $loginUsuario),
  6.     mysqli_real_escape_string($this->conexao, $codificado)
  7. );
  8.  
  9. $query = mysqli_query($this->conexao, $sql);
  10.    
  11. $statment = mysqli_prepare(
  12.     $this->conexao,
  13.     "SELECT *, DATE_FORMAT(DataAcesso,'%d/%m/%Y') AS DataDeAcesso,
  14.     DATE_FORMAT(DataAcesso,'%H:%i') AS HoraDeAcesso
  15.     FROM loja_admin WHERE EmailAdmin = ?
  16.     AND SenhaAdmin = ?"
  17. );
  18.  
  19. mysqli_stmt_bind_param($stmt, 'ss', $loginUsuario, $codificado);
  20. mysqli_stmt_execute($stmt);
  21.    
  22. $sql = sprintf(
  23.     "SELECT *, DATE_FORMAT(DataAcesso,'%%d/%%m/%%Y') AS DataDeAcesso,
  24.     DATE_FORMAT(DataAcesso,'%%H:%%i') AS HoraDeAcesso
  25.     FROM loja_admin WHERE EmailAdmin = '%s' AND SenhaAdmin = '%s'",
  26.     mysqli_real_escape_string($this->conexao, $loginUsuario),
  27.     mysqli_real_escape_string($this->conexao, $codificado)
  28. );
RAW Paste Data
Top