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


PHP Read::getRowCount方法代码示例

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


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

示例1: isset

          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">
        <label for="" class="col-md-3 control-label"></label>
开发者ID:Ritotsume,项目名称:schoolbus,代码行数:31,代码来源:cadastra.php

示例2: getSyntax

 private function getSyntax()
 {
     $read = new Read();
     $read->ExeRead($this->Tabela, $this->Termos, $this->Places);
     $this->Rows = $read->getRowCount();
     if ($this->Rows > $this->Limite) {
         $Paginas = ceil($this->Rows / $this->Limite);
         $MaxLinks = $this->MaxLinks;
         $this->Paginator = "<ul class=\"paginator\">";
         $this->Paginator .= "<li><a title=\"{$this->First}\" href=\"{$this->Link}1\">{$this->First}</a></li>";
         for ($iPag = $this->Page - $MaxLinks; $iPag <= $this->Page - 1; $iPag++) {
             if ($iPag >= 1) {
                 $this->Paginator .= "<li><a title=\"Página {$iPag}\" href=\"{$this->Link}{$iPag}\">{$iPag}</a></li>";
             }
         }
         $this->Paginator .= "<li><span class=\"active\">{$this->Page}</span></li>";
         for ($dPag = $this->Page + 1; $dPag <= $this->Page + $MaxLinks; $dPag++) {
             if ($dPag <= $Paginas) {
                 $this->Paginator .= "<li><a title=\"Página {$dPag}\" href=\"{$this->Link}{$dPag}\">{$dPag}</a></li>";
             }
         }
         $this->Paginator .= "<li><a title=\"{$this->Last}\" href=\"{$this->Link}{$Paginas}\">{$this->Last}</a></li>";
         $this->Paginator .= "</ul>";
     }
 }
开发者ID:BrunoDuarte,项目名称:WS_PHP_ADMIN,代码行数:25,代码来源:Pager.class.php

示例3: getSyntax

 private function getSyntax()
 {
     $read = new Read();
     $read->ExeRead($this->tabela, $this->termos, $this->places);
     $this->rows = $read->getRowCount();
     if ($this->rows > $this->limit) {
         $paginas = ceil($this->rows / $this->limit);
         $maxLinks = $this->maxLinks;
         $this->paginator = "<ul class=\"paginator\">";
         $this->paginator .= "<li><a title=\"{$this->first}\" href=\"{$this->link}1\">{$this->first}</a></li>";
         for ($iPag = $this->page - $maxLinks; $iPag <= $this->page - 1; $iPag++) {
             if ($iPag >= 1) {
                 $this->paginator .= "<li><a title=\"Página {$iPag}\" href=\"{$this->link}{$iPag}\">{$iPag}</a></li>";
             }
         }
         $this->paginator .= "<li><span=\"active\">{$this->page}</li>";
         for ($dPag = $this->page + 1; $dPag <= $this->page + $maxLinks; $dPag++) {
             if ($dPag <= $paginas) {
                 $this->paginator .= "<li><a title=\"Página {$dPag}\" href=\"{$this->link}{$dPag}\">{$dPag}</a></li>";
             }
         }
         $this->paginator .= "<li><a title=\"{$this->last}\" href=\"{$this->link}{$paginas}\">{$this->last}</a></li>";
         $this->paginator .= "</ul>";
     }
 }
开发者ID:brenolessa,项目名称:projeto-RI-Br,代码行数:25,代码来源:Page.class.php

示例4: getSyntax

 private function getSyntax()
 {
     $read = new Read();
     $read->ExeRead($this->Table, $this->Terms, $this->Places);
     $this->Rows = $read->getRowCount();
     // Verifica se tem resultados para que se faça a paginação
     if ($this->Rows > $this->Limit) {
         // Divide a quantidade de resultados (Rows) pelo limite para obter a quantidade de páginas
         $Paginas = ceil($this->Rows / $this->Limit);
         $MaxLinks = $this->MaxLinks;
         $this->Paginator = "<ul class=\"paginator\">";
         $this->Paginator .= "<li><a title=\"{$this->First}\" href=\"{$this->Link}1\">{$this->First}</a></li>";
         for ($iPag = $this->Page - $MaxLinks; $iPag <= $this->Page - 1; $iPag++) {
             if ($iPag >= 1) {
                 $this->Paginator .= "<li><a title=\"Página {$iPag}\" href=\"{$this->Link}{$iPag}\">{$iPag}</a></li>";
             }
         }
         $this->Paginator .= "<li><span class=\"active\">{$this->Page}</span></li>";
         for ($dPag = $this->Page + 1; $dPag <= $this->Page + $MaxLinks; $dPag++) {
             if ($dPag <= $Paginas) {
                 $this->Paginator .= "<li><a title=\"Página {$dPag}\" href=\"{$this->Link}{$dPag}\">{$dPag}</a></li>";
             }
         }
         $this->Paginator .= "<li><a title=\"{$this->Last}\" href=\"{$this->Link}{$Paginas}\">{$this->Last}</a></li>";
         $this->Paginator .= "</ul>";
     }
 }
开发者ID:WillianMonteiro,项目名称:_app,代码行数:27,代码来源:Pager.class.php

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

示例6: UserOnline

 public static function UserOnline()
 {
     $now = Date('Y-m-d H:i:s');
     $deleteUserOnline = new Delete();
     $deleteUserOnline->ExeDelete('ws_siteviews_online', "WHERE online_endview < :now", "now={$now}");
     $readUserOnline = new Read();
     $readUserOnline->ExeRead('ws_siteviews_online');
     return $readUserOnline->getRowCount();
 }
开发者ID:BrunoDuarte,项目名称:WS_PHP_ADMIN,代码行数:9,代码来源:Check.class.php

示例7: select

 private function select()
 {
     $ReadBanco = new Read();
     $ReadBanco->ExeRead(self::entidade, ($this->id != 0 ? 'WHERE id = :id' : null) . ' ORDER BY sigla', $this->id != 0 ? "id={$this->id}" : null);
     if ($ReadBanco->getRowCount() > 0) {
         $this->result = $ReadBanco->getResult();
     } else {
         $this->result = null;
     }
 }
开发者ID:angelomocbel,项目名称:proempenho,代码行数:10,代码来源:AdminBanco.class.php

示例8: select

 private function select()
 {
     $read = new Read();
     $read->ExeRead(self::entidade, ($this->id != 0 ? 'WHERE id = :id' : '') . ' ORDER BY nome', $this->id != 0 ? "id={$this->id}" : null);
     if ($read->getRowCount() > 0) {
         $this->result = $read->getResult();
     } else {
         $this->result = null;
     }
 }
开发者ID:angelomocbel,项目名称:proempenho,代码行数:10,代码来源:AdminSecretaria.class.php

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

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

示例11: checkPessoa

 private function checkPessoa()
 {
     $ReadPessoa = new Read();
     $ReadPessoa->ExeRead(self::entidade, "WHERE cadastro = :cadastro", "cadastro={$this->dados['cadastro']}");
     if ($ReadPessoa->getRowCount() > 0) {
         $this->result = false;
         $this->error = ["A identificação {$this->dados['cadastro']} já consta no sistema", WS_ALERT];
         return false;
     } else {
         return true;
     }
 }
开发者ID:angelomocbel,项目名称:proempenho,代码行数:12,代码来源:AdminPessoa.class.php

示例12: getRotas

 public function getRotas($status = null)
 {
     $read = new Read();
     if (!is_null($status)) {
         $read->Reader(self::Entity, 'where rota_status = :status', "status={$status}");
         if ($read->getResult()) {
             $this->result = $read->getResult();
             $this->rowcount = $read->getRowCount();
         } else {
             $this->result = false;
             $this->rowcount = 0;
         }
     } else {
         $read->Reader(self::Entity);
         if ($read->getResult()) {
             $this->result = $read->getResult();
             $this->rowcount = $read->getRowCount();
         } else {
             $this->result = false;
             $this->rowcount = 0;
         }
     }
 }
开发者ID:Ritotsume,项目名称:schoolbus,代码行数:23,代码来源:ModelRotas.class.php

示例13: Search

 private function Search()
 {
     $entidade = "pe_" . $this->dados['entidade'];
     $busca = $this->dados['busca'];
     $termos = '';
     $parseString = "busca={$busca}";
     if ($entidade == "pe_pessoa") {
         $termos = "WHERE nome LIKE '%' :busca '%' OR nome_fantasia LIKE '%' :busca '%' OR cadastro LIKE '%' :busca '%' OR email LIKE '%' :busca '%'";
     } elseif ($entidade == "pe_empenho") {
         $termos = "WHERE id LIKE '%' :busca '%' OR numero_doc LIKE '%' :busca '%' OR descricao LIKE '%' :busca '%' OR obs LIKE '%' :busca '%'";
     }
     $readBusca = new Read();
     $readBusca->ExeRead($entidade, $termos, $parseString);
     if ($readBusca->getRowCount() > 0) {
         $this->result = $readBusca->getResult();
         $this->error = null;
     } else {
         $this->result = false;
         $this->error = ["Nenhum registro encontrado em {$entidade} para a busca {$busca}", WS_ALERT];
     }
     //var_dump($readBusca);
 }
开发者ID:angelomocbel,项目名称:proempenho,代码行数:22,代码来源:Busca.class.php

示例14: updateUser

 private function updateUser()
 {
     $ArrOnline = ['online_endview' => $_SESSION['useronline']['online_endview'], 'online_url' => $_SESSION['useronline']['online_url']];
     $updateUser = new Update();
     $updateUser->ExeUpdate('wm_siteviews_online', $ArrOnline, "WHERE online_session = :ses", "ses={$_SESSION['useronline']['online_session']}");
     // Se o update nao for realizado com sucesso é por que a sessão foi morta então recria a sessão
     if (!$updateUser->getRowCount()) {
         $readSession = new Read();
         $readSession->ExeRead('wm_siteviews_online', 'WHERE online_session = :onses', "onses={$_SESSION['useronline']['online_session']}");
         if (!$readSession->getRowCount()) {
             // Reinicializa a sessão do usuário
             $this->setUser();
         }
     }
 }
开发者ID:WillianMonteiro,项目名称:_app,代码行数:15,代码来源:Statistics.class.php

示例15: Read

                </label>

                <label class="label_small">
                    <span class="field">Author:</span>
                    <select name="post_author">
                        <option value="<?php 
echo $_SESSION['userlogin']['user_id'];
?>
"> <?php 
echo "{$_SESSION['userlogin']['user_name']} {$_SESSION['userlogin']['user_lastname']}";
?>
 </option>
                        <?php 
$readAut = new Read();
$readAut->ExeRead("ws_users", "where user_id != :id and user_level >= :level order by user_name asc", "id={$_SESSION['userlogin']['user_id']}&level=2");
if ($readAut->getRowCount() >= 1) {
    foreach ($readAut->getResult() as $aut) {
        echo "<option ";
        if ($post['post_author'] == $aut['user_id']) {
            echo "selected=\"selected\"";
        }
        echo "value=\"{$aut['user_id']}\"> {$aut['user_name']} {$aut['user_lastname']} </option>";
    }
}
?>
                    </select>
                </label>

            </div><!--/line-->

            <div class="label gbform">
开发者ID:BrunoDuarte,项目名称:WS_PHP,代码行数:31,代码来源:create.php


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