salvando e consultando logs no mariadb
This commit is contained in:
@@ -443,6 +443,20 @@ class Controller extends DBA{
|
||||
$this->res = $this->stmt->fetchAll(PDO::FETCH_ASSOC);
|
||||
return $this-> res;
|
||||
}
|
||||
public function getLogs($USUARIO,$CIDADE,$SISTEMA){
|
||||
$this->sql = "SELECT *
|
||||
FROM log_pais
|
||||
WHERE NO_USUARIO LIKE ?
|
||||
AND CIDADE = ?
|
||||
AND SISTEMA = ? ";
|
||||
$this->stmt = $this->getMARIA()->prepare($this->sql);
|
||||
$this->stmt->bindValue(1,"%".$USUARIO."%");
|
||||
$this->stmt->bindValue(2,$CIDADE);
|
||||
$this->stmt->bindValue(3,$SISTEMA);
|
||||
$this->stmt->execute();
|
||||
$this->res = $this->stmt->fetchAll(PDO::FETCH_ASSOC);
|
||||
return $this-> res;
|
||||
}
|
||||
public function deletaPais($CPF){
|
||||
$this->sql = "DELETE FROM usuarios WHERE CPF = ?";
|
||||
$this->stmt = $this->getMARIA()->prepare($this->sql);
|
||||
|
||||
Reference in New Issue
Block a user