當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。