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


PHP mysql_class::fetch_field方法代码示例

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


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

示例1: __construct

 public function __construct($inp = array())
 {
     $mysql = new mysql_class();
     $css = 'ajaxgrid_mainDiv';
     $tableProperty = "class='ajaxgrid_mainTable'";
     if (count($inp) != 0 && is_array($inp)) {
         $gtmp = array();
         foreach ($inp as $gname => $det) {
             $gtmp[$gname]['gname'] = $gname;
             $gtmp[$gname]['table'] = $det['table'];
             $gtmp[$gname]['contentDiv'] = $det['div'];
             $this->contentDiv[$gname] = $det['div'];
             $gtmp[$gname]['canAdd'] = FALSE;
             $this->canAdd[$gname] = FALSE;
             $gtmp[$gname]['canEdit'] = FALSE;
             $this->canEdit[$gname] = FALSE;
             $gtmp[$gname]['canDelete'] = FALSE;
             $this->canDelete[$gname] = FALSE;
             $gtmp[$gname]['targetFile'] = $this->getAddr();
             $this->targetFile[$gname] = $gtmp[$gname]['targetFile'];
             $gtmp[$gname]['cssClass'] = 'ajaxgrid';
             $this->cssClass[$gname] = 'ajaxgrid';
             $gtmp[$gname]['start'] = TRUE;
             $this->start[$gname] = TRUE;
             $gtmp[$gname]['xls'] = FALSE;
             $this->xls[$gname] = TRUE;
             $gtmp[$gname]['addColCount'] = 3;
             $this->addColCount[$gname] = 3;
             $gtmp[$gname]['tableProperty'] = "class='ajaxgrid_mainTable'";
             $this->tableProperty[$gname] = "class='ajaxgrid_mainTable'";
             $gtmp[$gname]['css'] = "darkDiv";
             $gtmp[$gname]['eRequest'] = array();
             $gtmp[$gname]['pageNumber'] = 1;
             $gtmp[$gname]['query'] = isset($det['query']) ? $det['query'] : '';
             $this->query[$gname] = $gtmp[$gname]['query'];
             $this->tables[$gname] = $det['table'];
             $this->pageRows[$gname] = 10;
             $this->whereClause[$gname] = '';
             $this->pageNumber[$gname] = 1;
             $this->eRequest[$gname] = array();
             $this->scrollDown[$gname] = FALSE;
             $this->afterCreateFunction[$gname] = '';
             $this->disableRowColor[$gname] = FALSE;
             $this->buttonTitles[$gname] = array('delete' => 'حذف', 'add' => 'ثبت', 'next' => 'بعد', 'pre' => 'قبل');
             $q = null;
             $mysql->enableCache = FALSE;
             $mysql->oldSql = TRUE;
             $qur = isset($this->query[$gname]) && trim($this->query[$gname]) != '' ? $this->query[$gname] : 'select * from `' . $this->tables[$gname] . '` where 1=0 ';
             $mysql->directQuery($qur, $q);
             if (isset($this->query[$gname]) && trim($this->query[$gname]) != '') {
                 $this->qq[$gname] = $q;
             }
             while ($r = $mysql->fetch_field($q)) {
                 $cTmp['name'] = $r->name;
                 $cTmp['fieldname'] = $r->name;
                 $cTmp['css'] = '';
                 $cTmp['typ'] = $r->type;
                 $this->column[$gname][] = $cTmp;
             }
             $this->pageAllRows[$gname] = $this->getTableRowCount($det['table'], $_REQUEST);
             $this->pageCount[$gname] = xgrid::getPageCount($this->tables[$gname], $this->pageRows[$gname], $_REQUEST);
             $gtmp[$gname]['pageCount'] = $this->pageCount[$gname];
             $this->css[$gname] = $gtmp[$gname]['cssClass'];
             $this->tableProperty[$gname] = $gtmp[$gname]['tableProperty'];
             $this->addFunction[$gname] = null;
             $this->editFunction[$gname] = null;
             $this->deleteFunction[$gname] = null;
         }
         $this->arg = json_encode($gtmp);
         //toJSON($gtmp);
     }
 }
开发者ID:hscomp2002,项目名称:superp,代码行数:72,代码来源:xgrid.php


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