当前位置: 首页>>代码示例>>PHP>>正文


PHP POD::query方法代码示例

本文整理汇总了PHP中POD::query方法的典型用法代码示例。如果您正苦于以下问题:PHP POD::query方法的具体用法?PHP POD::query怎么用?PHP POD::query使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在POD的用法示例。


在下文中一共展示了POD::query方法的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);
 }
开发者ID:muzhiqiang,项目名称:school,代码行数:7,代码来源:evaluate.php

示例2: open

 function open($filter = '', $fields = '*', $sort = 'written')
 {
     global $database;
     if (is_numeric($filter)) {
         $filter = 'AND id = ' . $filter;
     } else {
         if (!empty($filter)) {
             $filter = 'AND ' . $filter;
         }
     }
     if (!empty($sort)) {
         $sort = 'ORDER BY ' . $sort;
     }
     $this->close();
     $this->_result = POD::query("SELECT {$fields} FROM {$database['prefix']}RemoteResponseLogs WHERE blogid = " . getBlogId() . " AND responsetype = 'trackback' {$filter} {$sort}");
     if ($this->_result) {
         if ($this->_count = POD::num_rows($this->_result)) {
             return $this->shift();
         } else {
             POD::free($this->_result);
         }
     }
     unset($this->_result);
     return false;
 }
开发者ID:Avantians,项目名称:Textcube,代码行数:25,代码来源:Textcube.Data.TrackbackLog.php

示例3: open

 function open($filter = '', $fields = '*', $sort = 'datemark DESC')
 {
     $ctx = Model_Context::getInstance();
     if (is_numeric($filter)) {
         $filter = 'AND datemark = ' . $filter;
     } else {
         if (!empty($filter)) {
             $filter = 'AND ' . $filter;
         }
     }
     if (!empty($sort)) {
         $sort = 'ORDER BY ' . $sort;
     }
     $this->close();
     $this->_result = POD::query("SELECT {$fields} FROM " . $ctx->getProperty('database.prefix') . "DailyStatistics WHERE blogid = " . getBlogId() . " {$filter} {$sort}");
     if ($this->_result) {
         if ($this->_count = POD::num_rows($this->_result)) {
             return $this->shift();
         } else {
             POD::free($this->_result);
         }
     }
     unset($this->_result);
     return false;
 }
开发者ID:Avantians,项目名称:Textcube,代码行数:25,代码来源:Textcube.Data.DailyStatistics.php

示例4: 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));
     }
 }
开发者ID:Avantians,项目名称:Textcube,代码行数:29,代码来源:Textcube.Data.php

示例5: open

 function open($filter = '', $sort = 'id')
 {
     global $database;
     if (is_numeric($filter)) {
         $filter = 'AND id = ' . $filter;
     } else {
         if (!empty($filter)) {
             $filter = 'AND filtertype = \'' . $filter . '\'';
         }
     }
     if (!empty($sort)) {
         $sort = 'ORDER BY ' . $sort;
     }
     $this->close();
     $this->_result = POD::query("SELECT * FROM {$database['prefix']}Filters WHERE blogid = " . getBlogId() . " {$filter} {$sort}");
     if ($this->_result) {
         if ($this->_count = POD::num_rows($this->_result)) {
             return $this->shift();
         } else {
             POD::free($this->_result);
         }
     }
     unset($this->_result);
     return false;
 }
开发者ID:webhacking,项目名称:Textcube,代码行数:25,代码来源:Textcube.Data.Filter.php

示例6: open

 function open($filter = '', $fields = '*', $sort = 'id')
 {
     global $database;
     if (is_numeric($filter)) {
         $filter = 'AND id = ' . $filter;
     } else {
         if (!empty($filter)) {
             $filter = 'AND ' . $filter;
         }
     }
     if (!empty($sort)) {
         $sort = 'ORDER BY ' . $sort;
     }
     $this->close();
     $this->_result = POD::query("SELECT {$fields}\n\t\t\tFROM {$database['prefix']}Comments\n\t\t\tWHERE blogid = " . getBlogId() . "\n\t\t\t\tAND entry = 0\n\t\t\t\t{$filter} {$sort}");
     if ($this->_result) {
         if ($this->_count = POD::num_rows($this->_result)) {
             return $this->shift();
         } else {
             POD::free($this->_result);
         }
     }
     unset($this->_result);
     return false;
 }
开发者ID:webhacking,项目名称:Textcube,代码行数:25,代码来源:Textcube.Data.GuestComment.php

示例7: open

 function open($filter = '', $fields = '*', $sort = 'subscribed DESC')
 {
     global $database;
     if (is_numeric($filter)) {
         $filter = 'AND id = ' . $filter;
     } else {
         if (!empty($filter)) {
             $filter = 'AND ' . $filter;
         }
     }
     if (!empty($sort)) {
         $sort = 'ORDER BY ' . $sort;
     }
     $this->close();
     $this->_result = POD::query("SELECT {$fields} FROM {$database['prefix']}SubscriptionStatistics WHERE blogid = " . getBlogId() . " {$filter} {$sort}");
     if ($this->_result) {
         if ($this->_count = POD::num_rows($this->_result)) {
             return $this->shift();
         } else {
             POD::free($this->_result);
         }
     }
     unset($this->_result);
     return false;
 }
开发者ID:ni5am,项目名称:Textcube,代码行数:25,代码来源:Textcube.Data.SubscriptionStatistics.php

示例8: queryWithDBCache

 /** NOTICE : PARTS BELOW EXTENDS DBQuery Class WHICH IS THE BASE OF POD
     AND WORKS ONLY WITH 'PageCache' Component in Textcube **/
 public static function queryWithDBCache($query, $prefix = null, $type = 'both', $count = -1)
 {
     $cache = queryCache::getInstance();
     $cache->reset($query, $prefix);
     if (!$cache->load()) {
         $cache->contents = POD::query($query, $type, $count);
         $cache->update();
     }
     return $cache->contents;
 }
开发者ID:ragi79,项目名称:Textcube,代码行数:12,代码来源:POD.php

示例9: showScoreAction

 public function showScoreAction()
 {
     $sql1 = "select c.Course_ID,c.Course,sc.Score,c.Property,c.credit,c.intro from Course as c,Stu_Course as sc where c.Course_ID = sc.Course_ID and c.Course_year_term = {$_POST['Course_year_term']} and sc.Stu_ID = {$_POST['Account']}";
     require_once $_SERVER['DOCUMENT_ROOT'] . '/school' . '/model/pod.php';
     $pod = new POD();
     $pod->connect();
     $result = $pod->query($sql1);
     foreach ($result as $key => $value) {
         $where = $result[$key]['Course_ID'];
         $sql2 = "select Stu_ID from Stu_Course where Course_ID='{$where}' order by Score desc";
         $ids = $pod->query($sql2);
         foreach ($ids as $rank => $id) {
             if ($id['Stu_ID'] == $_POST['Account']) {
                 $result[$key]['rank'] = $rank + 1;
                 break;
             }
         }
     }
     $pod->close();
     return json_encode($result);
 }
开发者ID:muzhiqiang,项目名称:school,代码行数:21,代码来源:score.php

示例10: 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;
 }
开发者ID:muzhiqiang,项目名称:school,代码行数:13,代码来源:messageContraceItem.php

示例11: 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;
 }
开发者ID:muzhiqiang,项目名称:school,代码行数:13,代码来源:teacherAwardItem.php

示例12: 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;
 }
开发者ID:muzhiqiang,项目名称:school,代码行数:13,代码来源:researchGroupProjectItem.php

示例13: 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;
 }
开发者ID:muzhiqiang,项目名称:school,代码行数:13,代码来源:researchGroupLogItem.php

示例14: leaderLinkStudent

 public function leaderLinkStudent($req, $lk, $arg)
 {
     $db = new POD();
     $p = $db->connect();
     if ($p == false) {
         throw new Exception('Database connect failed');
     }
     $map = array('classLeaderItem' => 'class_leader', 'studentInfoItem' => 'stu_basic_info');
     $table = array('class_leader', 'stu_basic_info');
     $sql = $db->genLinkSql($req, $lk, $arg, $table, $map);
     $res = $db->query($sql);
     return $res;
 }
开发者ID:muzhiqiang,项目名称:school,代码行数:13,代码来源:classLeaderItem.php

示例15: 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;
 }
开发者ID:muzhiqiang,项目名称:school,代码行数:13,代码来源:evaluateTypeItem.php


注:本文中的POD::query方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。