本文整理汇总了PHP中helper::getDB方法的典型用法代码示例。如果您正苦于以下问题:PHP helper::getDB方法的具体用法?PHP helper::getDB怎么用?PHP helper::getDB使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类helper
的用法示例。
在下文中一共展示了helper::getDB方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
public function __construct()
{
global $table;
$this->table = $table;
$this->cdb = helper::getDB('phpcms');
$this->wdb = helper::getDB('cmsware');
}
示例2: syncContent
public function syncContent()
{
$start = time();
$id = $this->indexid;
$wdb = helper::getDB('cmsware');
$cdb = helper::getDB('phpcms');
$sql = "select IndexID from cmsware_content_index where IndexID >= {$this->indexid} order by IndexID asc limit 10000";
$res = $wdb->fetchAll($sql);
foreach ($res as $k => $v) {
$id = $v['IndexID'];
error_log($id . "\n", 3, "process{$this->indexid}.log");
$url = sprintf(ADDCONENTURL, $id);
$res = curl_post($url, array());
$tmp = json_decode($res, true);
if (!isset($tmp['status']) || $tmp['status'] != 1) {
error_log($id . "\t" . strip_tags($res) . "\n", 3, "fail_content.log");
}
}
$end = time();
error_log($end - $start . "\n", 3, "time");
}
示例3: syncTableModel
$obj->run();
}
public function syncTableModel()
{
$obj = new tableid();
$obj->run();
}
}
$obj = new syncPHPcms();
$res = $obj->loginCms();
if ($res) {
$obj->syncSite();
$obj->syncModel();
$obj->syncModelFields();
if (is_file("alter.sql")) {
$cdb = helper::getDB("phpcms");
$c = file("alter.sql");
foreach ($c as $v) {
$sql = trim($v);
$res = $cdb->execute($sql);
}
}
$obj->syncUrlrule();
$obj->syncCategory();
//$obj->syncIndexId();
$obj->syncHists();
//$obj->syncTableModel();
$obj->syncAdminUser();
} else {
exit("登陆错误了");
}
示例4: __construct
public function __construct()
{
$this->wdb = helper::getDB('cmsware');
$this->getBaseWareSites();
$this->getcmsware_psn();
}
示例5: max
<?php
require_once __DIR__ . "/../init.php";
$db = helper::getDB("cmsware");
$sql = "select max(IndexID) as cnt from cmsware_content_index";
$res = $db->fetchOne($sql);
$max = $res['cnt'];
for ($i = 1; $i <= $max; $i = $i + 10000) {
echo "php syncContent.php {$i} &\n";
}