当前位置: 首页>>代码示例>>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;未经允许,请勿转载。