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


PHP msql_fetch_row函数代码示例

本文整理汇总了PHP中msql_fetch_row函数的典型用法代码示例。如果您正苦于以下问题:PHP msql_fetch_row函数的具体用法?PHP msql_fetch_row怎么用?PHP msql_fetch_row使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: getSpecialQuery

 /**
  * Obtain a list of a given type of objects
  *
  * @param string $type  the kind of objects you want to retrieve
  *
  * @return array  the array containing the list of objects requested
  *
  * @access protected
  * @see DB_common::getListOf()
  */
 function getSpecialQuery($type)
 {
     switch ($type) {
         case 'databases':
             $id = @msql_list_dbs($this->connection);
             break;
         case 'tables':
             $id = @msql_list_tables($this->dsn['database'], $this->connection);
             break;
         default:
             return null;
     }
     if (!$id) {
         return $this->msqlRaiseError();
     }
     $out = array();
     while ($row = @msql_fetch_row($id)) {
         $out[] = $row[0];
     }
     return $out;
 }
开发者ID:BackupTheBerlios,项目名称:saecommerce,代码行数:31,代码来源:msql.php

示例2: sql_fetch_row

function sql_fetch_row(&$res, $nr = 0)
{
    global $dbtype;
    switch ($dbtype) {
        case "MySQL":
            $row = mysql_fetch_row($res);
            return $row;
            break;
        case "mSQL":
            $row = msql_fetch_row($res);
            return $row;
            break;
        case "postgres":
        case "postgres_local":
            if ($res->get_total_rows() > $res->get_fetched_rows()) {
                $row = pg_fetch_row($res->get_result(), $res->get_fetched_rows());
                $res->increment_fetched_rows();
                return $row;
            } else {
                return false;
            }
            break;
        case "ODBC":
        case "ODBC_Adabas":
            $row = array();
            $cols = odbc_fetch_into($res, $nr, $row);
            return $row;
            break;
        case "Interbase":
            $row = ibase_fetch_row($res);
            return $row;
            break;
        case "Sybase":
            $row = sybase_fetch_row($res);
            return $row;
            break;
        default:
            break;
    }
}
开发者ID:BackupTheBerlios,项目名称:domsmod-svn,代码行数:40,代码来源:sql_layer.php

示例3: fetchInto

 /**
  * Fetch a row and insert the data into an existing array.
  *
  * Formating of the array and the data therein are configurable.
  * See DB_result::fetchInto() for more information.
  *
  * @param resource $result    query result identifier
  * @param array    $arr       (reference) array where data from the row
  *                            should be placed
  * @param int      $fetchmode how the resulting array should be indexed
  * @param int      $rownum    the row number to fetch
  *
  * @return mixed DB_OK on success, null when end of result set is
  *               reached or on failure
  *
  * @see DB_result::fetchInto()
  * @access private
  */
 function fetchInto($result, &$arr, $fetchmode, $rownum = null)
 {
     if ($rownum !== null) {
         if (!@msql_data_seek($result, $rownum)) {
             return null;
         }
     }
     if ($fetchmode & DB_FETCHMODE_ASSOC) {
         $arr = @msql_fetch_array($result, MSQL_ASSOC);
         if ($this->options['portability'] & DB_PORTABILITY_LOWERCASE && $arr) {
             $arr = array_change_key_case($arr, CASE_LOWER);
         }
     } else {
         $arr = @msql_fetch_row($result);
     }
     if (!$arr) {
         if ($error = @msql_error()) {
             return $this->raiseError($error);
         } else {
             return null;
         }
     }
     if ($this->options['portability'] & DB_PORTABILITY_RTRIM) {
         $this->_rtrimArrayValues($arr);
     }
     if ($this->options['portability'] & DB_PORTABILITY_NULL_TO_EMPTY) {
         $this->_convertNullArrayValuesToEmpty($arr);
     }
     return DB_OK;
 }
开发者ID:5haman,项目名称:knowledgetree,代码行数:48,代码来源:msql.php

示例4: fetchInto

 function fetchInto($result, &$ar, $fetchmode, $rownum = null)
 {
     if ($rownum !== null) {
         if (!@msql_data_seek($result, $rownum)) {
             return null;
         }
     }
     if ($fetchmode & DB_FETCHMODE_ASSOC) {
         $ar = @msql_fetch_array($result, MSQL_ASSOC);
     } else {
         $ar = @msql_fetch_row($result);
     }
     if (!$ar) {
         if ($error = msql_error()) {
             return $this->raiseError($error);
         } else {
             return null;
         }
     }
     return DB_OK;
 }
开发者ID:vojtajina,项目名称:sitellite,代码行数:21,代码来源:msql.php

示例5: FetchResultArray

 function FetchResultArray($result, &$array, $row)
 {
     if (isset($this->limits[$result])) {
         if ($row > $this->limits[$result][1]) {
             return $this->SetError("Fetch result array", "attempted to retrieve a row beyhond the result limit");
         }
         $actual_row = $row + $this->limits[$result][0];
     } else {
         $actual_row = $row;
     }
     if (!msql_data_seek($result, $row) || !($array = msql_fetch_row($result))) {
         return $this->SetError("Fetch result array", msql_error());
     }
     $this->highest_fetched_row[$result] = max($this->highest_fetched_row[$result], $row);
     return $this->ConvertResultRow($result, $array);
 }
开发者ID:BackupTheBerlios,项目名称:zvs,代码行数:16,代码来源:metabase_msql.php

示例6: FullSearchNextMatch

function FullSearchNextMatch($dbi, $res)
{
    global $WikiPageStore;
    if ($row = msql_fetch_row($res)) {
        return RetrievePage($dbi, $row[0], $WikiPageStore);
    } else {
        return 0;
    }
}
开发者ID:BackupTheBerlios,项目名称:oralux,代码行数:9,代码来源:msql.php


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