本文整理汇总了PHP中Read::findAll方法的典型用法代码示例。如果您正苦于以下问题:PHP Read::findAll方法的具体用法?PHP Read::findAll怎么用?PHP Read::findAll使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Read
的用法示例。
在下文中一共展示了Read::findAll方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Read
<?php
//Objeto READ
$read = new Read();
//VISITAS DO SITE
$read->FullRead(null, "SELECT SUM(siteviews_views) AS views FROM ws_siteviews");
$Views = $read->getResult()[0]->views;
//USUÁRIOS
$read->FullRead(null, "SELECT SUM(siteviews_users) AS users FROM ws_siteviews");
$Users = $read->getResult()[0]->users;
//MÉDIA DE PAGEVIEWS
$read->FullRead(null, "SELECT SUM(siteviews_pages) AS pages FROM ws_siteviews");
$ResPages = $read->getResult()[0]->pages;
$Pages = substr($ResPages / ($Users == 0 ? 1 : $Users), 0, 5);
//POSTS
$read->setTable("ws_posts");
$read->findAll();
$Posts = $read->getRowCount();
//EMPRESAS
$read->setTable("app_empresas");
$read->findAll();
$Empresas = $read->getRowCount();
?>
<ul>
<li class="view"><span><?php
echo $Views;
?>
</span> visitas</li>
<li class="user"><span><?php
echo $Users;
?>
示例2: getRow
private function getRow()
{
$Read = new Read($this->Tabela);
if (!empty($this->Places)) {
$Read->Query($this->Termos, $this->Places);
} else {
$Read->findAll();
}
return $Read->getRowCount();
}
示例3: findAll
public function findAll()
{
return $this->Read->findAll();
}