本文整理汇总了PHP中POD类的典型用法代码示例。如果您正苦于以下问题:PHP POD类的具体用法?PHP POD怎么用?PHP POD使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了POD类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: showYearAndTermAction
public function showYearAndTermAction()
{
$sql = "select Eva_year_term from evaluate order by Eva_year_term desc limit 1";
require_once $_SERVER['DOCUMENT_ROOT'] . '/school' . '/model/pod.php';
$pod = new POD();
$result = $pod->query($sql);
}
示例2: memberLinkInfo
public function memberLinkInfo($req, $lk, $arg)
{
$db = new POD();
$p = $db->connect();
if ($p == false) {
throw new Exception('Database connect failed');
}
$map = array('studentAssocationMemberItem' => 'stu_union_member', 'studentInfoItem' => 'stu_basic_info');
$table = array('stu_union_member', 'stu_basic_info');
$sql = $db->genLinkSql($req, $lk, $arg, $table, $map);
$res = $db->query($sql);
return $res;
}
示例3: classLinkStaff
public function classLinkStaff($req, $lk, $arg)
{
$db = new POD();
$p = $db->connect();
if ($p == false) {
throw new Exception('Database connect failed');
}
$map = array('classItem' => 'class', 'staffInfoItem' => 'emp_basic_info');
$table = array('class', 'emp_basic_info');
$sql = $db->genLinkSql($req, $lk, $arg, $table, $map);
$res = $db->query($sql);
return $res;
}
示例4: projectLinkGroup
public function projectLinkGroup($req, $lk, $arg)
{
$db = new POD();
$p = $db->connect();
if ($p == false) {
throw new Exception('Database connect failed');
}
$map = array('researchGroupProjectItem' => 'res_group_achievement', 'researchGroupItem' => 'res_group');
$table = array('res_group_achievement', 'res_group');
$sql = $db->genLinkSql($req, $lk, $arg, $table, $map);
$res = $db->query($sql);
return $res;
}
示例5: awardLinkTeacher
public function awardLinkTeacher($req, $lk, $arg)
{
$db = new POD();
$p = $db->connect();
if ($p == false) {
throw new Exception('Database connect failed');
}
$map = array('teacherInfoItem' => 'teacher_basic_info', 'teacherAwardItem' => 'teacher_award');
$table = array('teacher_award', 'teacher_basic_info');
$sql = $db->genLinkSql($req, $lk, $arg, $table, $map);
$res = $db->query($sql);
return $res;
}
示例6: stuLinkClass
public function stuLinkClass($req, $lk, $arg)
{
$db = new POD();
$p = $db->connect();
if ($p == false) {
throw new Exception('Database connect failed');
}
$map = array('studentIdentityItem' => 'stu_identification_info', 'studentInfoItem' => 'stu_basic_info');
$table = array('stu_identification_info', 'stu_basic_info');
$sql = $db->genLinkSql($req, $lk, $arg, $table, $map);
$res = $db->query($sql);
return $res;
}
示例7: messageLinkContent
public function messageLinkContent($req, $lk, $arg)
{
$db = new POD();
$p = $db->connect();
if ($p == false) {
throw new Exception('Database connect failed');
}
$map = array('messageContentItem' => 'message', 'messageContraceItem' => 'message_interconnect');
$table = array('message', 'message_interconnect');
$sql = $db->genLinkSql($req, $lk, $arg, $table, $map);
$res = $db->query($sql);
return $res;
}
示例8: logLinkGroupMember
public function logLinkGroupMember($req, $lk, $arg)
{
$db = new POD();
$p = $db->connect();
if ($p == false) {
throw new Exception('Database connect failed');
}
$map = array('researchGroupMemberItem' => 'res_member', 'researchGroupLogItem' => 'res_group_log');
$table = array('res_member', 'res_group_log');
$sql = $db->genLinkSql($req, $lk, $arg, $table, $map);
$res = $db->query($sql);
return $res;
}
示例9: removeAll
function removeAll($removeAttachments = true)
{
global $database;
$blogid = getBlogId();
POD::query("UPDATE {$database['prefix']}BlogStatistics SET visits = 0 WHERE blogid = {$blogid}");
POD::query("DELETE FROM {$database['prefix']}DailyStatistics WHERE blogid = {$blogid}");
POD::query("DELETE FROM {$database['prefix']}Categories WHERE blogid = {$blogid}");
POD::query("DELETE FROM {$database['prefix']}Attachments WHERE blogid = {$blogid}");
POD::query("DELETE FROM {$database['prefix']}Comments WHERE blogid = {$blogid}");
POD::query("DELETE FROM {$database['prefix']}RemoteResponses WHERE blogid = {$blogid}");
POD::query("DELETE FROM {$database['prefix']}RemoteResponseLogs WHERE blogid = {$blogid}");
POD::query("DELETE FROM {$database['prefix']}TagRelations WHERE blogid = {$blogid}");
POD::query("DELETE FROM {$database['prefix']}Entries WHERE blogid = {$blogid}");
POD::query("DELETE FROM {$database['prefix']}Links WHERE blogid = {$blogid}");
POD::query("DELETE FROM {$database['prefix']}Filters WHERE blogid = {$blogid}");
POD::query("DELETE FROM {$database['prefix']}RefererLogs WHERE blogid = {$blogid}");
POD::query("DELETE FROM {$database['prefix']}RefererStatistics WHERE blogid = {$blogid}");
POD::query("DELETE FROM {$database['prefix']}Plugins WHERE blogid = {$blogid}");
POD::query("DELETE FROM {$database['prefix']}FeedStarred WHERE blogid = {$blogid}");
POD::query("DELETE FROM {$database['prefix']}FeedReads WHERE blogid = {$blogid}");
POD::query("DELETE FROM {$database['prefix']}FeedGroupRelations WHERE blogid = {$blogid}");
POD::query("DELETE FROM {$database['prefix']}FeedGroups WHERE blogid = {$blogid}");
if (file_exists(__TEXTCUBE_CACHE_DIR__ . "/rss/{$blogid}.xml")) {
unlink(__TEXTCUBE_CACHE_DIR__ . "/rss/{$blogid}.xml");
}
if ($removeAttachments) {
Path::removeFiles(Path::combine(ROOT, 'attach', $blogid));
}
}
示例10: getEntriesByKeyword
function getEntriesByKeyword($blogid, $keyword)
{
global $database;
$keyword = POD::escapeString($keyword);
$visibility = doesHaveOwnership() ? '' : 'AND visibility > 1';
return POD::queryAll("SELECT id, userid, title, category, comments, published \n\t\t\tFROM {$database['prefix']}Entries \n\t\t\tWHERE blogid = {$blogid} \n\t\t\t\tAND draft = 0 {$visibility} \n\t\t\t\tAND category >= 0 \n\t\t\t\tAND (title LIKE '%{$keyword}%' OR content LIKE '%{$keyword}%')\n\t\t\tORDER BY published DESC");
}
示例11: facebookSocialPlugins
function facebookSocialPlugins($target, $mother)
{
global $database, $suri, $blog, $configVal;
$data = Misc::fetchConfigVal($configVal);
$output = '';
$directive = array('archive', 'category', 'guestbook', 'imageResizer', 'link', 'login', 'logout', 'pannels', 'protected', 'search', 'tag', 'trackback', 'rss', 'atom', 'ientry', 'sync', 'm', 'commentcomment');
if (in_array(str_replace('/', '', $suri['directive']), $directive)) {
return $target;
}
$permalink = $blog['useSloganOnPost'] ? 'entry/' . POD::queryCell("SELECT `slogan` FROM {$database['prefix']}Entries WHERE `id`={$mother} LIMIT 1") : $mother;
$permalink = urlencode(getBlogURL() . '/' . $permalink);
$title = urlencode(POD::queryCell("SELECT `title` FROM {$database['prefix']}Entries WHERE `id`={$mother} LIMIT 1"));
$output = '<div style="margin-top:1em;width:auto;height:auto;clear:both;">';
$__width = !isset($data['content_width']) || (int) $data['content_width'] <= 0 ? 520 : $data['content_width'];
if ($data['like_button']) {
$output .= '<div class="fb-like" data-href="' . $permalink . '" data-send="true" data-width="' . $__width . '" data-show-faces="true"></div>';
}
if ($data['comments']) {
$output .= '<div class="fb-comments" data-href="' . $permalink . '" data-num-posts="2" data-width="' . $__width . '"></div>';
}
if ($data['share']) {
$output .= '<div class="fb-send" data-href="' . $permalink . '"></div>';
}
$output .= '</div><br />';
return $target . $output;
}
示例12: close
function close()
{
if (isset($this->_result)) {
POD::free($this->_result);
unset($this->_result);
}
$this->_count = 0;
$this->reset();
}
示例13: removeServiceSetting
function removeServiceSetting($name, $pruneSimilarEntries = false)
{
global $database;
clearServiceSettingCache();
if ($pruneSimilarEntries) {
return POD::execute("DELETE FROM {$database['prefix']}ServiceSettings WHERE name like '" . POD::escapeString($name) . "'");
} else {
return POD::execute("DELETE FROM {$database['prefix']}ServiceSettings WHERE name = '" . POD::escapeString($name) . "'");
}
}
示例14: queryColumnWithDBCache
public static function queryColumnWithDBCache($query, $prefix = null, $type = 'both', $count = -1)
{
$cache = queryCache::getInstance();
$cache->reset($query, $prefix);
if (!$cache->load()) {
$cache->contents = POD::queryColumn($query, $type, $count);
$cache->update();
}
return $cache->contents;
}
示例15: test2Action
public function test2Action()
{
require $_SERVER['DOCUMENT_ROOT'] . '/school' . '/model/pod.php';
$db = new POD();
$p = $db->connect();
if ($p == false) {
throw new Exception('Database connect failed');
}
$req = array();
$lk = array('account');
$req[0] = array('key' => 'account', 'account' => '111', 'table' => 'p');
$arg = array('name', 'password');
$table = array('Person', 'Account');
$map = array('p' => 'Person', 'a' => 'Account');
$sql = $db->genLinkSql($req, $lk, $arg, $table, $map);
//echo $sql;
//exit;
$res = $db->query($sql);
return $res;
}