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


PHP query::query方法代码示例

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


在下文中一共展示了query::query方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: get

 public static function get($id = null)
 {
     $q = new query(RUDE_DATABASE_TABLE_CALENDAR_LEGEND);
     if ($id !== null) {
         $q->where(RUDE_DATABASE_FIELD_ID, (int) $id);
         $q->query();
         return $q->get_object();
     }
     $q->query();
     return $q->get_object_list();
 }
开发者ID:ThisNameWasFree,项目名称:rude-univ,代码行数:11,代码来源:rude-calendar-legend.php

示例2: get

 public static function get($id = null)
 {
     $q = new query(RUDE_DATABASE_TABLE_REPORTS_CATEGORIES_ITEMS);
     if ($id !== null) {
         $q->where(RUDE_DATABASE_FIELD_ID, (int) $id);
         $q->query();
         return $q->get_object();
     }
     $q->query();
     return $q->get_object_list();
 }
开发者ID:ThisNameWasFree,项目名称:rude-univ,代码行数:11,代码来源:rude-reports-categories-items.php

示例3: get

 public static function get($id = null)
 {
     $q = new query(RUDE_DATABASE_TABLE_SPECIALIZATIONS);
     if ($id !== null) {
         $q->where(RUDE_DATABASE_FIELD_ID, (int) $id);
         $q->query();
         return $q->get_object();
     }
     $q->order_by(RUDE_DATABASE_FIELD_NAME);
     $q->query();
     return $q->get_object_list();
 }
开发者ID:ThisNameWasFree,项目名称:rude-univ,代码行数:12,代码来源:rude-specializations.php

示例4: nextid

 function nextid($sequence)
 {
     $esequence = ereg_replace("'", "''", $sequence) . "_seq";
     $query = new query($this, "Select * from {$esequence} limit 1");
     $query->query($this, "REPLACE INTO {$esequence} values ('', nextval+1)");
     if ($query->result) {
         $result = @mysql_insert_id($this->connect_id);
     } else {
         $query->query($this, "CREATE TABLE {$esequence} ( seq char(1) DEFAULT '' NOT NULL, nextval bigint(20) unsigned DEFAULT '0' NOT NULL auto_increment, PRIMARY KEY (seq), KEY (nextval) )");
         $query->query($this, "REPLACE INTO {$esequence} values ('', nextval+1)");
         $result = @mysql_insert_id($this->connect_id);
     }
     return $result;
 }
开发者ID:pioytazsko,项目名称:drell,代码行数:14,代码来源:_mysql.php

示例5: get_by_report

 public static function get_by_report($report_id)
 {
     $q = new query(RUDE_DATABASE_TABLE_EDUCATION_PREVIEW);
     $q->where(RUDE_DATABASE_FIELD_REPORT_ID, (int) $report_id);
     $q->query();
     return $q->get_object_list();
 }
开发者ID:ThisNameWasFree,项目名称:rude-univ,代码行数:7,代码来源:rude-education-preview.php

示例6: get_by_shortname

 public static function get_by_shortname($shortname)
 {
     $q = new query(RUDE_DATABASE_TABLE_FACULTIES);
     $q->where(RUDE_DATABASE_FIELD_SHORTNAME, $shortname);
     $q->query();
     return $q->get_object();
 }
开发者ID:ThisNameWasFree,项目名称:rude-univ,代码行数:7,代码来源:rude-faculties.php

示例7: get_by_name

 public static function get_by_name($name)
 {
     $q = new query(RUDE_DATABASE_TABLE_QUALIFICATIONS);
     $q->where(RUDE_DATABASE_FIELD_NAME, $name);
     $q->query();
     return $q->get_object();
 }
开发者ID:ThisNameWasFree,项目名称:rude-univ,代码行数:7,代码来源:rude-qualifications.php

示例8: get_by_order

 public static function get_by_order($education_id)
 {
     $q = new query(RUDE_DATABASE_TABLE_EDUCATION_ITEMS_VALUES);
     $q->where('education_id', (int) $education_id);
     $q->order_by('order_num', 'ASC');
     $q->query();
     return $q->get_object_list();
 }
开发者ID:ThisNameWasFree,项目名称:rude-univ,代码行数:8,代码来源:rude-education-items-values.php

示例9: get_popup

 public static function get_popup($user_id)
 {
     $q = new query(RUDE_DATABASE_TABLE_SETTINGS);
     $q->where(RUDE_DATABASE_FIELD_USER_ID, (int) $user_id);
     $q->where(RUDE_DATABASE_FIELD_NAME, 'popup');
     $q->query();
     return $q->get_object();
 }
开发者ID:ThisNameWasFree,项目名称:rude-univ,代码行数:8,代码来源:rude-settings.php

示例10: is_exists

 public static function is_exists($id)
 {
     $q = new query(RUDE_DATABASE_TABLE_USERS);
     $q->where(RUDE_DATABASE_FIELD_ID, (int) $id);
     $q->query();
     if ($q->get_object()) {
         return true;
     }
     return false;
 }
开发者ID:ThisNameWasFree,项目名称:rude-univ,代码行数:10,代码来源:rude-users.php

示例11: is_exists

 public static function is_exists($name)
 {
     $q = new query(RUDE_DATABASE_TABLE_TRAINING_FORM);
     $q->where(RUDE_DATABASE_FIELD_NAME, $name);
     $q->query();
     if ($q->get_object()) {
         return true;
     }
     return false;
 }
开发者ID:ThisNameWasFree,项目名称:rude-univ,代码行数:10,代码来源:rude-training-forms.php

示例12: _get_message_tree

function _get_message_tree($id)
{
    global $PHORUM, $DB;
    $q = new query($DB);
    $SQL = "Select id from {$PHORUM['ForumTableName']} where parent={$id}";
    $q->query($DB, $SQL);
    $tree = "{$id}";
    while ($rec = $q->getrow()) {
        $tree .= "," . _get_message_tree($rec["id"]);
    }
    return $tree;
}
开发者ID:carriercomm,项目名称:xmec,代码行数:12,代码来源:delete_message.php

示例13: get

 public static function get($report_id = null, $year = null)
 {
     $q = new query(RUDE_DATABASE_TABLE_CALENDAR_ITEMS);
     if ($year !== null) {
         $q->where(RUDE_DATABASE_FIELD_YEAR, (int) $year);
     }
     if ($report_id !== null) {
         $q->where(RUDE_DATABASE_FIELD_REPORT_ID, (int) $report_id);
     }
     $q->query();
     return $q->get_object_list();
 }
开发者ID:ThisNameWasFree,项目名称:rude-univ,代码行数:12,代码来源:rude-calendar-items.php

示例14: nextid

 function nextid($sequence)
 {
     $esequence = $sequence . "_seq";
     $query = new query($this, "select nextval('{$esequence}') as nextid");
     if ($query->result) {
         $row = $query->getrow();
         $nextid = $row["nextid"];
     } else {
         $query->query($this, "create sequence {$esequence}");
         if ($query->result) {
             $nextid = $this->nextid($sequence);
         } else {
             $nextid = 0;
         }
     }
     return $nextid;
 }
开发者ID:carriercomm,项目名称:xmec,代码行数:17,代码来源:postgresql.php

示例15: while

    while (is_array($rec)) {
        $empty = false;
        $name = $rec["name"];
        $num = $rec["id"];
        $description = $rec["description"];
        if (!$rec["folder"]) {
            $sSQL = "select count(*) as posts from {$rec['table_name']} where approved='Y'";
            $tq = new query($DB, $sSQL);
            if ($tq->numrows()) {
                $trec = $tq->getrow();
                $num_posts = $trec["posts"];
            } else {
                $num_posts = '0';
            }
            $sSQL = "select max(datestamp) as max_date from {$rec['table_name']} where approved='Y'";
            $tq->query($DB, $sSQL);
            $trec = $tq->getrow();
            if (empty($trec["max_date"])) {
                $last_post_date = "";
            } else {
                $last_post_date = phorum_date_format($trec["max_date"]);
            }
            $posts = "{$lNumPosts}: <strong>{$num_posts}</strong>&nbsp;&nbsp;";
            $last = "{$lLastPostDate}: <strong>{$last_post_date}</strong>";
            $url = "{$list_page}.{$ext}?f={$num}{$GetVars}";
        } else {
            $last = $lForumFolder;
            $url = "{$forum_page}.{$ext}?f={$num}{$GetVars}";
        }
        ?>
<tr>
开发者ID:carriercomm,项目名称:Exult,代码行数:31,代码来源:index.php


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