本文整理汇总了PHP中PoTable::updateByAnd方法的典型用法代码示例。如果您正苦于以下问题:PHP PoTable::updateByAnd方法的具体用法?PHP PoTable::updateByAnd怎么用?PHP PoTable::updateByAnd使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PoTable
的用法示例。
在下文中一共展示了PoTable::updateByAnd方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: date
$tanggalstat = date("Ymd");
$waktustat = time();
$tablestat = new PoTable('traffic');
$totalstat = $tablestat->numRowByAnd(ip, $ipstat, tanggal, $tanggalstat);
if ($totalstat == 0) {
$tablestatp = new PoTable('traffic');
$tablestatp->save(array('ip' => $ipstat, 'tanggal' => $tanggalstat, 'hits' => 1, 'online' => $waktustat));
} else {
$tablestatp2 = new PoTable('traffic');
$statpro = $tablestatp2->findByAnd(ip, $ipstat, tanggal, $tanggalstat);
$statpro = $statpro->current();
$hitspro = $statpro->hits;
$hitspro = $hitspro + 1;
$datastat = array('hits' => $hitspro, 'online' => $waktustat);
$tablestat2 = new PoTable('traffic');
$tablestat2->updateByAnd('ip', $ipstat, 'tanggal', $tanggalstat, $datastat);
}
/*--- hapus baris ini dan ubah urlnya jika web Anda sudah di hosting
function facebook_shares($url){
$fql = "SELECT url, normalized_url, share_count, like_count, comment_count, ";
$fql .= "total_count, commentsbox_count, comments_fbid, click_count FROM ";
$fql .= "link_stat WHERE url = '".$url."'";
$apifql="https://api.facebook.com/method/fql.query?format=json&query=".urlencode($fql);
$fb_json=file_get_contents($apifql);
return json_decode($fb_json);
}
$fb = facebook_shares('http://www.popojicms.org');
$sharefb = $fb[0]->share_count;
function twitter_shares($url) {
示例2: PoTable
<div id="login-container" class="animation-fadeIn">
<div class="login-title text-center">
<h1><strong>Recover Panel</strong></h1>
</div>
<div class="block remove-margin">
<?php
include_once '../po-library/po-database.php';
$table = new PoTable('users');
$currentUser = $table->findByAnd(username, $forgetuser, forget_key, $forgetkey);
$currentUser = $currentUser->current();
if ($currentUser > 0) {
if ($currentUser->blokir == "N") {
$newcode = "123456";
$pass = md5($newcode);
$data = array('password' => $pass, 'forget_key' => '');
$table->updateByAnd('username', $forgetuser, 'forget_key', $forgetkey, $data);
?>
<div class="alert alert-success alert-dismissable">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
<h4><i class="fa fa-check-circle"></i> Success</h4>
Your password has been <a href="javascript:void(0)" class="alert-link">successfully reset</a> !
</div>
<?php
} else {
?>
<div class="alert alert-warning alert-dismissable">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
<h4><i class="fa fa-exclamation-circle"></i> Warning</h4>
Your account was <a href="javascript:void(0)" class="alert-link">blocked</a> !
</div>
<?php
示例3: PoTable
<body>
<div class="top"><div class="colors"></div></div>
<div id="login-container" class="animation-fadeIn">
<div class="login-title text-center">
<h1><strong>Activation Account Panel</strong></h1>
</div>
<div class="block remove-margin">
<?php
include_once '../po-library/po-database.php';
$table = new PoTable('users');
$currentUser = $table->findByAnd(username, $activeuser, id_session, $key);
$currentUser = $currentUser->current();
if ($currentUser > 0) {
if ($currentUser->blokir == "Y") {
$data = array('blokir' => 'N');
$table->updateByAnd('username', $activeuser, 'id_session', $key, $data);
?>
<div class="alert alert-success alert-dismissable">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
<h4><i class="fa fa-check-circle"></i> Success</h4>
Your account have been <a href="javascript:void(0)" class="alert-link">activated</a> !
</div>
<?php
} else {
?>
<div class="alert alert-info alert-dismissable">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
<h4><i class="fa fa-exclamation-circle"></i> Info</h4>
Your account already <a href="javascript:void(0)" class="alert-link">activated</a> !
</div>
<?php