當前位置: 首頁>>代碼示例>>PHP>>正文


PHP BD::NumRows方法代碼示例

本文整理匯總了PHP中BD::NumRows方法的典型用法代碼示例。如果您正苦於以下問題:PHP BD::NumRows方法的具體用法?PHP BD::NumRows怎麽用?PHP BD::NumRows使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在BD的用法示例。


在下文中一共展示了BD::NumRows方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: Evento

 /**
  * Construtor 
  * @param int $id
  * @return void
  */
 function Evento($idevento)
 {
     $db = new BD();
     $sql = sprintf("select\n\t\t\t   id,\n\t\t\t   data,\n\t\t\t   local,\n\t\t\t   descricao\n\t\t\t   from\n               cad_eventos\n               where id= %d", $idevento);
     $db->Query($sql);
     if ($db->NumRows() == 0) {
         $this->Existe = 'N';
     } else {
         $this->Existe = 'S';
         $db->Next();
         $this->ID = $idevento;
         $this->Data = $db->getValue('data');
         $this->Local = $db->getValue('local');
         $this->Descricao = $db->getValue('descricao');
     }
     $db->Close();
 }
開發者ID:alencarmo,項目名稱:OCF,代碼行數:22,代碼來源:class.evento.php

示例2: Reuniao

 /**
  * Construtor 
  * @param int $id
  * @return void
  */
 function Reuniao($id)
 {
     $db = new BD();
     $sql = sprintf("select\n\t\t\t   id,\n\t\t\t   data,\n\t\t\t   hora,\n\t\t\t   local\n\t\t\t   from\n               cad_reuniao\n               where id= %d", $id);
     $db->Query($sql);
     if ($db->NumRows() == 0) {
         $this->Existe = 'N';
     } else {
         $this->Existe = 'S';
         $db->Next();
         $this->ID = $id;
         $this->Data = $db->getValue('data');
         $this->Hora = $db->getValue('hora');
         $this->Local = $db->getValue('local');
     }
     $db->Close();
 }
開發者ID:alencarmo,項目名稱:OCF,代碼行數:22,代碼來源:class.smsreceive.php

示例3: Calendario

 /**
  * Construtor 
  * @param int $id
  * @return void
  */
 function Calendario($id)
 {
     $db = new BD();
     $sql = sprintf("select\n\t\t\t   idcalendario,\n\t\t\t   dataevento,\n\t\t\t   titulo,\n\t\t\t   descricao,\n\t\t\t   local,\n\t\t\t   realizacao\n\t\t\t   from\n               tb_calendario\n               where idcalendario= %d", $id);
     $db->Query($sql);
     if ($db->NumRows() == 0) {
         $this->Existe = 'N';
     } else {
         $this->Existe = 'S';
         $db->Next();
         $this->ID = $id;
         $this->Data = $db->getValue('dataevento');
         $this->Titulo = $db->getValue('titulo');
         $this->Descricao = $db->getValue('descricao');
         $this->Local = $db->getValue('local');
         $this->Realizacao = $db->getValue('realizacao');
     }
     $db->Close();
 }
開發者ID:alencarmo,項目名稱:OCF,代碼行數:24,代碼來源:class.calendario.php

示例4: Enquete

 /**
  * Construtor 
  * @param int $userid
  * @return void
  */
 function Enquete($codigo)
 {
     $db = new BD();
     $sql = sprintf("select\n\t\t\t   numero,\n\t\t\t   pergunta,\n\t\t\t   datainicio,\n\t\t\t   datafim,\n\t\t\t   tiporesposta,\n\t\t\t   restrita\t\t\t   \n\t\t\t   from\n               cad_enquete\n               where numero= %d", $codigo);
     $db->Query($sql);
     if ($db->NumRows() == 0) {
         $this->Existe = 'N';
     } else {
         $this->Existe = 'S';
         $db->Next();
         $this->Codigo = $codigo;
         $this->Pergunta = $db->getValue('pergunta');
         $this->DataInicio = $db->getValue('datainicio');
         $this->DataFim = $db->getValue('datafim');
         $this->TipoResposta = $db->getValue('tiporesposta');
         $this->Restrita = $db->getValue('restrita');
         $this->CarregaOpcoes();
     }
     $db->Close();
 }
開發者ID:alencarmo,項目名稱:OCF,代碼行數:25,代碼來源:class.enquete.php

示例5: BD

<tr><td colspan=10 align="center">
<div style="width:430px;border:solid 1px #a0b0b0;background:#fff;">
<table  style="width:450px;" width="450px" bordercolor="white" class='dettab' border="1px" cellspacing=0 frame="box" rules="all">

<?php 
require_once $_SESSION['DOCROOT'] . "/classes/class.bd.php";
require_once $_SESSION['DOCROOT'] . "/classes/class.usuario.php";
require_once $_SESSION['DOCROOT'] . "/classes/class.campeonato.php";
require_once $_SESSION['DOCROOT'] . "/classes/class.inscricao.php";
$db = new BD();
$sql = sprintf("select i.campeonato,i.userid " . "from " . "cad_inscricao i, " . "cad_usuario u, " . "cad_campeonato c " . "where " . "i.campeonato = c.codigo " . "and i.userid = u.userid " . "and c.flandamento = 'S' and c.codigo = 4 " . "order by " . "c.ano desc," . "i.campeonato," . "i.posefetiva," . "u.username");
$db->Query($sql);
$camp = 0;
$posant = 0;
$pos = 0;
if ($db->NumRows() == 0) {
    echo '         <tr> <td>Não existe campeonatos cadastrados ou em andamento no momento.<br></td> </tr>' . "\n";
} else {
    while ($db->Next()) {
        if ($camp != $db->getValue('campeonato')) {
            if ($camp != 0) {
                echo "<tr><td colspan=4><br></td></tr>\n";
            }
            $pos = 0;
            $cmp = new Campeonato($db->getValue('campeonato'));
            echo "<tr style='background:rgb(250, 252, 188);color:rgb(0, 102, 0);'><td colspan=10 align=center><b>" . $cmp->getDescricaoAno() . "</td></tr>\n";
            echo "<tr style='background:rgb(250, 252, 188);color:rgb(0, 102, 0);'><td colspan=3 align=center><b>Classificação do Bolão</td>\n\t\t\t\t\t\t\t</tr>\n";
            $camp = $cmp->getCodigo();
            echo "<tr  class='cabec'><td align=center>Pos</td><td>Participante</td><td align=center>Pontos</td></tr>\n";
        }
        $usr = new Usuario($db->getValue('userid'));
開發者ID:alencarmo,項目名稱:OCF,代碼行數:31,代碼來源:clasbolao.php


注:本文中的BD::NumRows方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。