本文整理汇总了PHP中PDOConnection::CountRow方法的典型用法代码示例。如果您正苦于以下问题:PHP PDOConnection::CountRow方法的具体用法?PHP PDOConnection::CountRow怎么用?PHP PDOConnection::CountRow使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PDOConnection
的用法示例。
在下文中一共展示了PDOConnection::CountRow方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
public function __construct()
{
parent::__construct();
// Config Application instance.
$this->site = array(DOMAIN => 'http://' . $_SERVER['HTTP_HOST'] . '/', ROOT => $_SERVER['DOCUMENT_ROOT'] . '/', STORE => 'file_store', COM => 'facebook/component/', MOD => 'facebook/module/', APP => 'http://apps.facebook.com/hakkomew/', IFRAME => 'http://' . $_SERVER['HTTP_HOST'] . '/facebook/module/iframe/');
//Set Default Component
if (!isset($_GET['component'])) {
$_GET['component'] = 'frontpage';
}
//Query ID Position
foreach (parent::ViewTable('position', 0) as $pos) {
$this->idPosition[$pos['name']] = $pos['pos_id'];
}
//Query ID Component
$this->idComponent = parent::GetValue('com_id', 'component', 'name', $_GET['component']);
//Online User
$user = self::Facebook('/me');
if ($user['session']) {
if (!isset($_GET['manga'])) {
$this->Update('user_online', 'mag_id', 0, 'uid', $user['session']['uid']);
}
$delWhere = parent::GetValue('expires', 'user_online', 'uid', $user['session']['uid']) . '<' . $_SERVER['REQUEST_TIME'];
$this->Delete('user_online', $delWhere);
if (parent::CountRow('user_online', 'uid', $user['session']['uid']) < 1) {
$this->Insert('user_online', array('expires', 'uid'), array($user['session']['expires'], $user['session']['uid']));
}
} else {
// Guest User.
echo '<iframe src="' . $this->site[IFRAME] . 'guest_cookie.php" frameborder="0" style="width:0px; height:0px;"></iframe>';
}
}
示例2: __construct
public function __construct()
{
parent::__construct();
$userid = ereg_replace('\\.', '', $_SERVER['REMOTE_ADDR']);
$expires = time() + 1200;
$table = 'user_online';
$column = array('expires', 'uid', 'mag_id', 'guest');
$values = array($expires, $userid, 0, 1);
if (parent::CountRow($table, 'uid', $userid) < 1) {
try {
$sqlString = parent::InsertString($table, $column);
$statement = $this->isConnect->prepare($sqlString);
$statement = parent::bindState($statement, $column, $values);
$statement->execute();
} catch (PDOException $e) {
parent::ErrorException('Insert', $e, $sqlString);
}
}
}
示例3: array
<?php
$site = array(DOMAIN => 'http://' . $_SERVER['HTTP_HOST'] . '/', ROOT => $_SERVER['DOCUMENT_ROOT'] . '/', MOD => 'facebook/module/');
require_once $site[ROOT] . 'facebook/cgi-bin/connection.class.php';
require_once $site[ROOT] . 'facebook/cgi-bin/language/thai.language.php';
$online = new PDOConnection();
$total_online = $online->CountRow('user_online', 0, 0);
$guest_online = $online->CountRow('user_online', 'guest', 1);
echo $total_online - $guest_online . _MANGA_READ;
?>
<?php
if ($guest_online != 0) {
?>
<span class="text-detail">(<?php
echo _MANGA_GUEST . $guest_online . _MANGA_READ;
?>
)</span>
<?php
}
示例4: PDOConnection
$online = new PDOConnection();
$mangaDetails = new MangaReader(array($site[STORE], $_POST['name']));
$manga['name'] = rawurlencode($_POST['name']) . '/';
foreach ($mangaDetails->getArray() as $mlist) {
if (is_file($mlist['path'])) {
list($filename, $fileextended) = explode('.', $mlist['name']);
if ($filename == 'thumb') {
$manga['thumb'] = $mangaDetails->getDomain() . $mlist['name'];
}
}
}
if (!isset($manga['thumb'])) {
$manga['thumb'] = 'http://hakko.9friend.net/images/none-thumb.jpg';
}
$manga['view'] = $online->GetValue('view', 'manga', 'mag_id', $_POST['id']);
$manga['online'] = $online->CountRow('user_online', 'mag_id', $_POST['id']);
?>
<a href="<?php
echo $online->GetValue('link', 'manga', 'mag_id', $_POST['id']);
?>
"><h2><?php
echo $_POST['name'];
?>
</h2>
<table width="230" border="0" cellpadding="2" cellspacing="0" class="manga-list">
<tr>
<td width="50"><div class="thumb-img" style="width:40px;height:40px;">
<fb:tag name="img">
<fb:tag-attribute name="src"><?php
echo $manga['thumb'];