當前位置: 首頁>>代碼示例>>PHP>>正文


PHP mysql_class::fetch_array方法代碼示例

本文整理匯總了PHP中mysql_class::fetch_array方法的典型用法代碼示例。如果您正苦於以下問題:PHP mysql_class::fetch_array方法的具體用法?PHP mysql_class::fetch_array怎麽用?PHP mysql_class::fetch_array使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在mysql_class的用法示例。


在下文中一共展示了mysql_class::fetch_array方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: add

 public function add($tableName, $data, $query)
 {
     if ($tableName != '') {
         $createTime = date("Y-m-d H:i:s");
         $mysql = new mysql_class();
         $thisId = -1;
         $mysql->enableCache = FALSE;
         $mysql->directQuery("select `id` from `cache` where `tableName` = '{$tableName}' and `query` = '{$query}' ", $q);
         if ($r = $mysql->fetch_array($q)) {
             $thisId = $r['id'];
         }
         if ($thisId > 0) {
             $mysql->directQueryx("update  `cache` set `data` = '" . serialize($data) . "' where `id` = '{$thisId}'");
         } else {
             $ln = $mysql->ex_sqlx("insert into `cache` (`tableName`,`data`,`createTime`,`query`) values('{$tableName}','" . serialize($data) . "','{$createTime}','{$query}') ", FALSE);
             $thisId = (int) $mysql->insert_id($ln);
             $mysql->close($ln);
         }
         $this->id = $thisId;
         $this->tableName = $tableName;
         $this->data = $data;
         $this->query = $query;
         $this->createTime = $createTime;
         $this->viewCount = 1;
     }
     return $this->id;
 }
開發者ID:hscomp2002,項目名稱:superp,代碼行數:27,代碼來源:cache_class.php

示例2: edit_item

function edit_item($id, $feild, $value)
{
    if ($feild == 'frase') {
        $mysql = new mysql_class();
        $mysql->ex_sql("select `id` from `access_det` where `acc_id` = (select `acc_id` from `access_det` where `id`={$id}) and `frase` = '{$value}'", $q);
        if (!($r = $mysql->fetch_array($q))) {
            $mysql->ex_sqlx("update `access_det` set `frase` = '{$value}' where `id`={$id}");
        }
    } else {
        $mysql->ex_sqlx("update `access_det` set `{$feild}` = '{$value}' where `id`={$id}");
    }
}
開發者ID:hscomp2002,項目名稱:superp,代碼行數:12,代碼來源:access_det.php

示例3: loadGrooh

function loadGrooh($inp = -1)
{
    $out = null;
    $mysql = new mysql_class();
    $inp = (int) $inp;
    $mysql->ex_sql("select `name`,`id` from `grop` order by `name`", $q);
    while ($r = $mysql->fetch_array($q)) {
        if ((int) $r["id"] != $inp) {
            $out[$r["name"]] = (int) $r["id"];
        }
    }
    return $out;
}
開發者ID:hscomp2002,項目名稱:superp,代碼行數:13,代碼來源:group.habibi.php

示例4: loadList

 public function loadList($table, $val, $text, $where)
 {
     $out = array();
     $mysql = new mysql_class();
     $mysql->ex_sql("select `{$val}`,`{$text}` from `{$table}` where {$where} ", $q);
     while ($r = $mysql->fetch_array($q)) {
         $out[$r[$val]] = $r[$text];
     }
     return $out;
 }
開發者ID:hscomp2002,項目名稱:superp,代碼行數:10,代碼來源:xgrid.php

示例5: isset

    $customer_id = isset($_REQUEST["customer_id"]) ? (int) $_REQUEST["customer_id"] : -1;
} else {
    $customer_id = (int) $_SESSION[$conf->app . "_customer_id"];
}
$report_type = isset($_REQUEST["report_type"]) ? (int) $_REQUEST["report_type"] : 0;
$grid = new jshowGrid_new("customer_daryaft", "grid1");
switch ($report_type) {
    case 0:
        //-------mohasebe mande az ghabl------------
        $mande_azghabl = "SELECT SUM(`mablagh`*`typ`) as `mande`  FROM `customer_daryaft` where DATE(`tarikh`) < '{$saztarikh}' and  `typ`<>0 ";
        if (isset($_REQUEST["customer_id"]) && (int) $_REQUEST["customer_id"] != -2) {
            $mande_azghabl .= " and `customer_id` = '" . (int) $_REQUEST["customer_id"] . "' ";
        }
        $mysql->ex_sql($mande_azghabl, $qmand);
        $mande_ghabl_value = 0;
        if ($rmand = $mysql->fetch_array($qmand)) {
            $mande_ghabl_value = $rmand['mande'];
        }
        $grid->addFeild("id");
        $grid->addFeild("id");
        $grid->addFeild("id");
        $grid->fieldList[5] = "id";
        $grid->index_width = '30px';
        $grid->width = '99%';
        $grid->columnHeaders[0] = null;
        $grid->columnHeaders[1] = "مشتری(آژانس)";
        $grid->columnHeaders[2] = null;
        $grid->columnHeaders[3] = null;
        $grid->columnHeaders[4] = "تاریخ";
        $grid->columnHeaders[5] = "شرح سند";
        $grid->columnHeaders[6] = "شماره سند";
開發者ID:hscomp2002,項目名稱:superp,代碼行數:31,代碼來源:sanad_gozaresh.php


注:本文中的mysql_class::fetch_array方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。