ajuste para pesquisa de usuario por nome
This commit is contained in:
@@ -35,22 +35,33 @@ class Controller extends DBA{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
public function getAcessoFirebird($LOGIN,$CIDADE){
|
||||
public function getAcessoFirebird($NOME,$CIDADE){
|
||||
$this->sql = "SELECT L.CD_LOGIN, L.CD_USUARIO_SISTEMA, L.NO_USERNAME, L.SENHA, US.NO_USUARIO_SISTEMA
|
||||
FROM LOGIN L
|
||||
INNER JOIN USUARIO_SISTEMA US ON L.CD_USUARIO_SISTEMA = US.CD_USUARIO_SISTEMA WHERE NO_USERNAME LIKE ?";
|
||||
FROM USUARIO_SISTEMA US
|
||||
INNER JOIN LOGIN L ON L.CD_USUARIO_SISTEMA = US.CD_USUARIO_SISTEMA
|
||||
WHERE US.NO_USUARIO_SISTEMA LIKE ?";
|
||||
$Con = new Controller();
|
||||
$this->stmt = $Con -> getSTMT($CIDADE,$this->sql);
|
||||
$this->stmt->bindValue(1,"%".$LOGIN."%");
|
||||
$this->stmt->bindValue(1,"%".$NOME."%");
|
||||
$this->stmt->execute();
|
||||
$this->res = $this->stmt->fetchAll(PDO::FETCH_ASSOC);
|
||||
return $this-> res;
|
||||
}
|
||||
public function getAcessoMariaDB($LOGIN,$CIDADE){
|
||||
$this->sql = "SELECT * FROM acessos WHERE ID_USUARIO LIKE ? AND CIDADE = ?";
|
||||
$this->sql = "SELECT * FROM acessos WHERE ID_USUARIO = ? AND CIDADE = ?";
|
||||
$Con = new Controller();
|
||||
$this->stmt = $this->getMARIA()->prepare($this->sql);
|
||||
$this->stmt->bindValue(1,"%".$LOGIN."%");
|
||||
$this->stmt->bindValue(1,$LOGIN);
|
||||
$this->stmt->bindValue(2,$CIDADE);
|
||||
$this->stmt->execute();
|
||||
$this->res = $this->stmt->fetchAll(PDO::FETCH_ASSOC);
|
||||
return $this-> res;
|
||||
}
|
||||
public function getPesquisaAcessoMariaDB($NOME,$CIDADE){
|
||||
$this->sql = "SELECT * FROM acessos WHERE NO_USUARIO_SISTEMA LIKE ? AND CIDADE = ?";
|
||||
$Con = new Controller();
|
||||
$this->stmt = $this->getMARIA()->prepare($this->sql);
|
||||
$this->stmt->bindValue(1,"%".$NOME."%");
|
||||
$this->stmt->bindValue(2,$CIDADE);
|
||||
$this->stmt->execute();
|
||||
$this->res = $this->stmt->fetchAll(PDO::FETCH_ASSOC);
|
||||
@@ -58,7 +69,7 @@ class Controller extends DBA{
|
||||
}
|
||||
public function getLoginControle($NO_USERNAME,$CIDADE){
|
||||
if(!$NO_USERNAME==''){
|
||||
$this->sql = "SELECT L.CD_USUARIO_SISTEMA,L.SENHA, L.NO_USERNAME, US.CD_CENTRO_CUSTO, CC.CD_UNIDADE, CD.NO_FANTASIA
|
||||
$this->sql = "SELECT L.CD_USUARIO_SISTEMA,L.SENHA, US.NO_USUARIO_SISTEMA, L.NO_USERNAME, US.CD_CENTRO_CUSTO, CC.CD_UNIDADE, CD.NO_FANTASIA
|
||||
FROM LOGIN L
|
||||
INNER JOIN USUARIO_SISTEMA US ON L.CD_USUARIO_SISTEMA = US.CD_USUARIO_SISTEMA
|
||||
INNER JOIN CENTRO_CUSTO CC ON US.CD_CENTRO_CUSTO = CC.CD_CENTRO_CUSTO
|
||||
|
||||
Reference in New Issue
Block a user