本文整理汇总了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;
}
示例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}");
}
}
示例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;
}
示例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;
}
示例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] = "شماره سند";