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


PHP Read類代碼示例

本文整理匯總了PHP中Read的典型用法代碼示例。如果您正苦於以下問題:PHP Read類的具體用法?PHP Read怎麽用?PHP Read使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


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

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

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

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

示例6: ExeStatus

 public function ExeStatus($PostId, $PostStatus)
 {
     $this->Post = (int) $PostId;
     $this->Data['post_status'] = (string) $PostStatus;
     $Read = new Read('ws_posts');
     $this->Data['post_id'] = $this->Post;
     $Read->update($this->Data);
 }
開發者ID:adrianosilvareis,項目名稱:FrameWork_Front,代碼行數:8,代碼來源:AdminPost.class.php

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

示例8: Trabalho

 public function Trabalho($parametro)
 {
     include_once 'app/View/header.php';
     $tipoAtividade = new Read();
     $tipoAtividade->ExeRead('tipo_atividades');
     include_once 'app/View/form-trabalho.php';
     $parametro = $parametro;
     include_once 'app/View/footer.php';
 }
開發者ID:victorborgaco,項目名稱:projetoSoftware,代碼行數:9,代碼來源:PessoaC.php

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

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

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

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

示例13: setName

 private function setName()
 {
     $email = $this->Data['email'];
     $readName = new Read();
     $readName->ExeRead(self::Entity, "WHERE cpf = {$this->Data['cpf']} or email = '{$email}'");
     if ($readName->getResult()) {
         $this->Msg = "<script>alert('Ja possui Cadastrado em Nosso Sitema!');</script>";
     } else {
         $this->Create();
     }
 }
開發者ID:jairophp,項目名稱:projetoSoftware,代碼行數:11,代碼來源:Pessoa.php

示例14: GetAccountId

 /**
  * Obtem o player com o id tal
  * @return $Array [] de player
  */
 public static function GetAccountId($id)
 {
     $Read = new Read();
     $Read->ExeRead('players', "WHERE id = :id", "id={$id}");
     $Result = $Read->getResult();
     if ($Result) {
         return $Result;
     } else {
         return false;
     }
 }
開發者ID:Aberos,項目名稱:OTPANEL,代碼行數:15,代碼來源:Players.class.php

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


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