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


PHP Read::Reader方法代码示例

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


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

示例1: 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

示例2: 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

示例3: 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

示例4: getBairroNome

 public function getBairroNome($id)
 {
     $read = new Read();
     $read->Reader(self::Bairro, ' where bairros_id = :id', "id={$id}");
     if ($read->getRowCount() > 0) {
         $nomeBairro = $read->getResult();
         $this->result = $nomeBairro[0]['bairros_nome'];
         $this->rowcount = $read->getRowCount();
     } else {
         $this->result = false;
         $this->rowcount = 0;
     }
 }
开发者ID:Ritotsume,项目名称:schoolbus,代码行数:13,代码来源:ModelEnderecos.class.php

示例5: isset

          <input type="number" name="motorista_cpf" id="motorista_cpf" placeholder="123.456.789-00"
          class="form-control" value="<?php 
echo isset($dados['motorista_cpf']) ? $dados['motorista_cpf'] : '';
?>
" />
        </div>
      </div>

      <div class="form-group">
        <label for="tb_logradouros_logradouro_id" class="col-md-3 control-label">Endereço</label>
        <div class="col-md-4">
          <select class="form-control" name="tb_logradouros_logradouro_id" id="tb_logradouros_logradouro_id">
            <option value="">Selecione...</option>
            <?php 
$readerlog = new Read();
$readerlog->Reader('tb_logradouros', 'inner join tb_bairros on ' . 'tb_logradouros.tb_bairros_bairros_id = tb_bairros.bairros_id');
if ($readerlog->getRowCount() > 0) {
    foreach ($readerlog->getResult() as $options) {
        if ($options['logradouro_id'] == $dados['tb_logradouros_logradouro_id']) {
            echo "<option value=\"{$options['logradouro_id']}\" selected=\"selected\">{$options['logradouro_nome']} -- " . "{$options['bairros_nome']}</option>";
        } else {
            echo "<option value=\"{$options['logradouro_id']}\">{$options['logradouro_nome']} -- " . "{$options['bairros_nome']}</option>";
        }
    }
}
?>
          </select>
        </div>
      </div>

      <div class="form-group">
开发者ID:Ritotsume,项目名称:schoolbus,代码行数:31,代码来源:cadastra.php

示例6: getInstituicoes

 public function getInstituicoes($escolas)
 {
     $escolas = json_decode($escolas, true);
     $read = new Read();
     $data = array();
     $div = '';
     foreach ($escolas as $escola) {
         $read->Reader('tb_instituicoes', 'where instituicao_id = :id', "id={$escola}");
         if ($read->getResult()) {
             $data[] = $read->getResult()[0]['instituicao_nome'];
         }
     }
     return implode(', ', $data);
 }
开发者ID:Ritotsume,项目名称:schoolbus,代码行数:14,代码来源:ModelRotas.class.php

示例7: getVeiculo

 public function getVeiculo($idveiculo)
 {
     $read = new Read();
     $read->Reader(self::Entity, 'where veiculo_id = :id', "id={$idveiculo}");
     if ($read->getResult()) {
         $this->result = $read->getResult();
         $this->rowcount = $read->getRowCount();
     } else {
         $this->result = false;
         $this->rowcount = 0;
     }
 }
开发者ID:Ritotsume,项目名称:schoolbus,代码行数:12,代码来源:ModelVeiculo.class.php


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