当前位置: 首页>>代码示例>>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;未经允许,请勿转载。