当前位置: 首页>>代码示例>>PHP>>正文


PHP Read::getResult方法代码示例

本文整理汇总了PHP中Read::getResult方法的典型用法代码示例。如果您正苦于以下问题:PHP Read::getResult方法的具体用法?PHP Read::getResult怎么用?PHP Read::getResult使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Read的用法示例。


在下文中一共展示了Read::getResult方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: ExeDelete

 /**
  * <b>Remover Usuário:</b> Informe o ID do usuário que deseja remover. Este método não permite deletar
  * o próprio perfil ou ainda remover todos os ADMIN'S do sistema!
  * @param INT $UserId = Id do usuário
  */
 public function ExeDelete($UserId)
 {
     $this->User = (int) $UserId;
     $readUser = new Read();
     $readUser->ExeRead(self::Entity, "WHERE user_id = :id", "id={$this->User}");
     if (!$readUser->getResult()) {
         $this->Error = ['Oppsss, você tentou remover um usuário que não existe no sistema!', WS_ERROR];
         $this->Result = false;
     } elseif ($this->User == $_SESSION['userlogin']['user_id']) {
         $this->Error = ['Oppsss, você tentou remover seu usuário. Essa ação não é permitida!!!', WS_INFOR];
         $this->Result = false;
     } else {
         if ($readUser->getResult()[0]['user_level'] == 3) {
             $readAdmin = $readUser;
             $readAdmin->ExeRead(self::Entity, "WHERE user_id != :id AND user_level = :lv", "id={$this->User}&lv=3");
             if (!$readAdmin->getRowCount()) {
                 $this->Error = ['Oppsss, você está tentando remover o único ADMIN do sistema. Para remover cadastre outro antes!!!', WS_ERROR];
                 $this->Result = false;
             } else {
                 $this->Delete();
             }
         } else {
             $this->Delete();
         }
     }
 }
开发者ID:johnnylima,项目名称:Wfood,代码行数:31,代码来源:AdminUser.class.php

示例2: getNames

 private function getNames($nutri)
 {
     $read = new Read();
     $read->FullRead("SELECT nutri_name FROM " . DB_NUTRICAO . " WHERE nutri_id = :id", "id={$nutri}");
     if ($read->getResult()) {
         return $read->getResult()[0]['nutri_name'];
     } else {
         return null;
     }
 }
开发者ID:claytongf,项目名称:patr,代码行数:10,代码来源:AdminReportNutricao.class.php

示例3: Read

 function __construct($FamiliaId, $EducandoId)
 {
     $this->FamiliaId = $FamiliaId;
     $this->EducandoId = $EducandoId;
     $read = new Read();
     $read->ExeRead(DB_FAMILIA, "WHERE familia_id = :id", "id={$this->FamiliaId}");
     if ($read->getResult()) {
         $this->DadosPai = ['nome' => $read->getResult()[0]['familia_pai_nome'], 'telefone' => $read->getResult()[0]['familia_pai_telefonefixo']];
         $this->DadosMae = ['nome' => $read->getResult()[0]['familia_mae_nome'], 'telefone' => $read->getResult()[0]['familia_mae_telefonefixo']];
         $read->ExeRead(DB_EDUCANDOS, "WHERE educando_id = :id", "id={$this->EducandoId}");
         if ($read->getResult()) {
             $this->DadosEducando = ['nome' => $read->getResult()[0]['educando_nome']];
             $this->Result = true;
             $read->ExeRead(DB_SAUDE, "WHERE educando_id = :id", "id={$this->EducandoId}");
             if ($read->getResult()) {
                 $this->ExistRecord = true;
                 $this->Data = $read->getResult()[0];
             } else {
                 $this->ExistRecord = false;
                 $this->Data = null;
             }
         } else {
             $this->Result = false;
             $this->Error = ['Erro. Não existe cadastro para esse educando no sistema', TW_ERROR];
         }
     } else {
         $this->Result = false;
         $this->Error = ['Erro. Não existe cadastro para essa família no sistema', TW_ERROR];
     }
 }
开发者ID:claytongf,项目名称:patr,代码行数:30,代码来源:AdminSaude.class.php

示例4: getUser

 private function getUser()
 {
     $read = new Read();
     $read->ExeRead('pessoas', "WHERE email = :e AND senha = :p", "e={$this->Email}&p={$this->Senha}");
     if ($read->getResult()) {
         $this->Result = $read->getResult()[0];
         return true;
     } else {
         return false;
     }
 }
开发者ID:jairophp,项目名称:projetoSoftware,代码行数:11,代码来源:Login.php

示例5: getUser

 private function getUser()
 {
     $this->Senha = md5($this->Senha);
     $read = new Read();
     $read->ExeRead("ws_users", "WHERE user_email = :e AND user_password = :p", "e={$this->Email}&p={$this->Senha}");
     if ($read->getResult()) {
         $this->Result = $read->getResult()[0];
         return TRUE;
     } else {
         return FALSE;
     }
 }
开发者ID:BrunoDuarte,项目名称:WS_PHP_ADMIN,代码行数:12,代码来源:Login.class.php

示例6: getInstituicao

 public function getInstituicao($id)
 {
     $read = new Read();
     $read->Reader(self::Entity, 'inner join tb_logradouros on ' . self::Entity . '.tb_logradouros_logradouro_id = tb_logradouros.logradouro_id ' . 'inner join tb_bairros on tb_logradouros.tb_bairros_bairros_id = tb_bairros.bairros_id ' . 'inner join tb_cidade on tb_cidade.cidade_id = tb_bairros.tb_cidade_cidade_id ' . 'where instituicao_id = :id', "id={$id}");
     if ($read->getResult()) {
         $this->result = $read->getResult();
         $this->rowcount = $read->getRowCount();
     } else {
         $this->result = false;
         $this->rowcount = 0;
     }
 }
开发者ID:Ritotsume,项目名称:schoolbus,代码行数:12,代码来源:ModelInstituicao.class.php

示例7: getUser

 private function getUser()
 {
     $this->senha = md5($this->senha);
     $read = new Read();
     $read->ExeRead('usuario', "WHERE login = :e AND senha = :p", "e={$this->login}&p={$this->senha}");
     if ($read->getResult()) {
         $this->result = $read->getResult()[0];
         return true;
     } else {
         return false;
     }
 }
开发者ID:brenolessa,项目名称:projeto-RI-Br,代码行数:12,代码来源:Login.class.php

示例8: getMotorista

 public function getMotorista($idmotorista)
 {
     $read = new Read();
     $read->Reader(self::Entity, 'inner join tb_logradouros on ' . self::Entity . '.tb_logradouros_logradouro_id = tb_logradouros.logradouro_id ' . 'inner join tb_bairros on tb_logradouros.tb_bairros_bairros_id = tb_bairros.bairros_id ' . ' where motorista_id = :id', "id={$idmotorista}");
     if ($read->getResult()) {
         $this->result = $read->getResult();
         $this->rowcount = $read->getRowCount();
     } else {
         $this->result = false;
         $this->rowcount = 0;
     }
 }
开发者ID:Ritotsume,项目名称:schoolbus,代码行数:12,代码来源:ModelMotorista.class.php

示例9: GetUser

 private function GetUser()
 {
     $this->Pass = md5($this->Pass);
     $read = new Read();
     $read->ExeRead('user', "WHERE email = :e AND password = :p", "e={$this->Email}&p={$this->Pass}");
     if ($read->getResult()) {
         $this->Result = $read->getResult()[0];
         return true;
     } else {
         return FALSE;
     }
 }
开发者ID:arthurleon,项目名称:ytradio,代码行数:12,代码来源:Login.class.php

示例10: getUser

 private function getUser()
 {
     $readUser = new Read();
     $readUser->ExeRead(DB_USERS, "WHERE user_email = :email", "email={$this->DestinoEmail}");
     if ($readUser->getResult()) {
         $this->DestinoNome = $readUser->getResult()[0]['user_name'] . ' ' . $readUser->getResult()[0]['user_lastname'];
         $this->UserId = $readUser->getResult()[0]['user_id'];
         return true;
     } else {
         return false;
     }
 }
开发者ID:claytongf,项目名称:patr,代码行数:12,代码来源:RecoverEmail.php

示例11: Login

 public function Login($user, $pass)
 {
     $pass = md5($pass);
     $read = new Read();
     $read->Reader('tb_users', 'where user_login = :user and user_pass = :pass', "user={$user}&pass={$pass}");
     if ($read->getResult()) {
         $data = $read->getResult();
         $_SESSION['schoolbus_login'] = array('username' => $data[0]['user_login'], 'user_url' => $data[0]['user_url'], 'user_nome' => $data[0]['user_nome'], 'nivel' => $data[0]['user_nivel']);
         return true;
     } else {
         if (isset($_SESSION['schoolbus_login'])) {
             unset($_SESSION['schoolbus_login']);
         }
         return false;
     }
 }
开发者ID:Ritotsume,项目名称:schoolbus,代码行数:16,代码来源:ModelAdmin.class.php

示例12: getCategory

 /**
  * Busca a categoria a partir do id
  * @param INT $Category - ID do usuário cadastrado no banco
  * @return STRING - retorna o nome da categoria
  */
 public function getCategory($Category)
 {
     $this->CatId = $Category;
     $read = new Read();
     $read->FullRead("SELECT cat_name FROM " . DB_PRODUTOS_CATEGORIAS . " WHERE cat_id = :id", "id={$this->CatId}");
     return $read->getResult()[0]['cat_name'];
 }
开发者ID:claytongf,项目名称:patr,代码行数:12,代码来源:AdminReportEstoque.class.php

示例13: getUserName

 /**
  * Busca o login do usuário a partir do user_id
  * @param INT $userid - ID do usuário cadastrado no banco
  * @return STRING - retorna o login do usuário
  */
 public function getUserName($UserId)
 {
     $this->UserId = $UserId;
     $read = new Read();
     $read->FullRead("SELECT user_login FROM " . DB_USERS . " WHERE user_id = :id", "id={$this->UserId}");
     return $read->getResult()[0]['user_login'];
 }
开发者ID:claytongf,项目名称:patr,代码行数:12,代码来源:AdminReportVisitas.class.php

示例14: getUser

 private function getUser()
 {
     $read = new Read();
     $read->ExeRead(DB_USERS, "WHERE user_email = :e", "e={$this->Email}");
     $this->Senha = sha1($this->Email . $this->Senha);
     $this->Senha = crypt($this->Senha, sha1($this->Email));
     $options = ['cost' => 11];
     $this->Senha = password_hash($this->Senha, PASSWORD_BCRYPT, $options);
     if ($read->getResult() && password_verify($read->getResult()[0]['user_password'], $this->Senha)) {
         $this->Result = $read->getResult()[0];
         $this->Id = $read->getResult()[0]['user_id'];
         return true;
     } else {
         return false;
     }
 }
开发者ID:claytongf,项目名称:patr,代码行数:16,代码来源:Login.php

示例15: setName

 private function setName()
 {
     $Where = isset($this->Post) ? "post_id != {$this->Post} and" : '';
     $readName = new Read();
     $readName->ExeRead(self::Entity, "where {$Where} post_title = :t", "t={$this->Data['post_title']}");
     if ($readName->getResult()) {
         $this->Data['post_name'] = $this->Data['post_name'] . '-' . $readName->getRowCount();
     }
 }
开发者ID:BrunoDuarte,项目名称:WS_PHP,代码行数:9,代码来源:AdminPost.class.php


注:本文中的Read::getResult方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。