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


PHP odbc_fetch_into函数代码示例

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


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

示例1: numero_filas

 /**
  * Devuelve la cantidad de filas de un resultado de query
  * 
  * @access public
  * @param (object) result set
  * @return (int) cantidad de filas en el resulta set
  */
 function numero_filas($rs)
 {
     // Fix para odbc_num_rows que siempre devuelve -1 para MS Access
     $count = 0;
     while ($temp = odbc_fetch_into($rs, $counter)) {
         $count++;
     }
     // Reset cursor position
     odbc_fetch_row($rs, 0);
     return $count;
 }
开发者ID:Nilphy,项目名称:moteguardian,代码行数:18,代码来源:DbODBC.php

示例2: FetchInto

 function FetchInto($result, $row, &$array)
 {
     if ($this->php_version >= 4002000) {
         return odbc_fetch_into($result, $array, $row);
     } elseif ($this->php_version >= 4000005) {
         return odbc_fetch_into($result, $row, $array);
     } else {
         eval("\$success=odbc_fetch_into(\$result,\$row,&\$array);");
         return $success;
     }
 }
开发者ID:BackupTheBerlios,项目名称:zvs,代码行数:11,代码来源:metabase_odbc.php

示例3: _fetch_array

function _fetch_array($bdid)
{
    global $ODBC_ID, $last_odbc_result;
    if (odbc_fetch_into($bdid, $res_odbc_row)) {
        foreach ($res_odbc_row as $k => $v) {
            $data_odbc_row[odbc_field_name($bdid, $k + 1)] = $v;
        }
        return $data_odbc_row;
    } else {
        return False;
    }
}
开发者ID:BackupTheBerlios,项目名称:ascore,代码行数:12,代码来源:odbc.inc.php

示例4: ironhacker

 /**
 	Thanks to ironhacker (ironhacker at users.sourceforge.net) for this!
 */
 function odbc_fetch_array_hack($result, $rownumber = -1)
 {
     $rs_assoc = array();
     if (PHP_VERSION > "4.1") {
         if ($rownumber < 0) {
             odbc_fetch_into($result, &$rs);
         } else {
             odbc_fetch_into($result, &$rs, $rownumber);
         }
     } else {
         odbc_fetch_into($result, $rownumber, &$rs);
     }
     foreach ($rs as $key => $value) {
         $rs_assoc[odbc_field_name($result, $key + 1)] = $value;
     }
     return $rs_assoc;
 }
开发者ID:brustj,项目名称:tracmor,代码行数:20,代码来源:db_odbc.php

示例5: Find

 public function Find()
 {
     $conn = parent::GetConnection();
     $query = $this->SetupQuery(Query::FIND_STATISTICS);
     $result = odbc_exec($conn, $query);
     if (!$result) {
         return $this->HandleError();
     }
     $row = array();
     if (!odbc_fetch_into($result, $row)) {
         return $this->HandleError();
     }
     $this->idDailyTask = $row[0];
     $this->StatsClass = $row[1];
     $this->StartDate = $row[2];
     $this->EndDate = $row[3];
     return true;
 }
开发者ID:hadleymj,项目名称:Senior-Design-Fall-2009,代码行数:18,代码来源:StatsDAO.php

示例6: next_record

 function next_record()
 {
     $this->Record = array();
     $this->{$stat} = odbc_fetch_into($this->Query_ID, ++$this->Row, &$this->Record);
     if (!$this->{$stat}) {
         if ($this->Auto_Free) {
             odbc_free_result($this->Query_ID);
             $this->Query_ID = 0;
         }
     } else {
         // add to Record[<key>]
         $count = odbc_num_fields($this->Query_ID);
         for ($i = 1; $i <= $count; $i++) {
             $this->Record[strtolower(odbc_field_name($this->Query_ID, $i))] = $this->Record[$i - 1];
         }
     }
     return $this->Record;
 }
开发者ID:phpMyChat-Plus,项目名称:phpmychat-plus,代码行数:18,代码来源:odbc.lib.php

示例7: Find

 public function Find()
 {
     if (!parent::Find()) {
         return false;
     }
     if ($this->StatsClass != "WalkingStats") {
         return false;
     }
     $conn = parent::GetConnection();
     $query = $this->SetupQuery(Query::FIND_WALKING_STATS);
     $result = odbc_exec($conn, $query);
     if (!$result) {
         return $this->HandleError();
     }
     $row = array();
     if (!odbc_fetch_into($result, $row)) {
         return $this->HandleError();
     }
     $this->Steps = $row[0];
     return true;
 }
开发者ID:hadleymj,项目名称:Senior-Design-Fall-2009,代码行数:21,代码来源:WalkingStatsDAO.php

示例8: Find

 public function Find()
 {
     if (!parent::Find()) {
         return false;
     }
     if ($this->DailyTaskClass != "WalkingTask") {
         return false;
     }
     $conn = parent::GetConnection();
     $query = $this->SetupQuery(Query::FIND_WALKING_TASK);
     $result = odbc_exec($conn, $query);
     if (!$result) {
         return false;
     }
     $row = array();
     if (!odbc_fetch_into($result, $row)) {
         return false;
     }
     $this->Steps = $row[0];
     return true;
 }
开发者ID:hadleymj,项目名称:Senior-Design-Fall-2009,代码行数:21,代码来源:WalkingTaskDAO.php

示例9: _odbc_fetch_array

 /**
  * Result - array
  *
  * subsititutes the odbc_fetch_array function when
  * not available (odbc_fetch_array requires unixODBC)
  *
  * @access	private
  * @return	array
  */
 function _odbc_fetch_array(&$odbc_result)
 {
     $rs = array();
     $rs_assoc = FALSE;
     if (odbc_fetch_into($odbc_result, $rs)) {
         $rs_assoc = array();
         foreach ($rs as $k => $v) {
             $field_name = odbc_field_name($odbc_result, $k + 1);
             $rs_assoc[$field_name] = $v;
         }
     }
     return $rs_assoc;
 }
开发者ID:pmward,项目名称:Codeigniter-Braintree-v.zero-test-harness,代码行数:22,代码来源:odbc_result.php

示例10: var_dump

var_dump($rval);
$val = odbc_result($rh, 1);
var_dump($val);
// fetch_array, next
echo "testing odbc_fetch_array, next\n";
$rval = odbc_fetch_array($rh);
var_dump($rval);
// fetch_array with row number
echo "testing odbc_fetch_array with row specified\n";
$rval = odbc_fetch_array($rh, 4);
var_dump($rval);
// fetch_object, next
echo "testing odbc_fetch_object, next\n";
$rval = odbc_fetch_object($rh);
var_dump($rval);
// fetch_object with row number
echo "testing odbc_fetch_object with row specified\n";
$rval = odbc_fetch_object($rh, 4);
var_dump($rval);
// fetch_into, next
$ar = array();
echo "testing odbc_fetch_into, next\n";
$rval = odbc_fetch_into($rh, $ar);
var_dump($rval);
var_dump($ar);
// fetch_into with row number
echo "testing odbc_fetch_into with row specified\n";
$rval = odbc_fetch_into($rh, $ar, 7);
var_dump($rval);
var_dump($ar);
echo odbc_close($r);
开发者ID:jenalgit,项目名称:roadsend-php,代码行数:31,代码来源:fetches.php

示例11: tryGet

 /**
  * return a numeric indexed array.
  */
 function tryGet()
 {
     $succ = odbc_fetch_into($this->query, $row);
     if ($succ === false) {
         return false;
     } else {
         return $row;
     }
 }
开发者ID:wistoft,项目名称:BST,代码行数:12,代码来源:gybala.php

示例12: 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

示例13: _fetch

 function _fetch()
 {
     $row = 0;
     $rez = odbc_fetch_into($this->_queryID, $row, $this->fields);
     if ($rez && $this->fetchMode == ADODB_FETCH_ASSOC) {
         $this->fields = $this->GetRowAssoc(false);
     }
     return $rez;
 }
开发者ID:qoire,项目名称:portal,代码行数:9,代码来源:adodb-odbc.inc.php

示例14: db_fetch_numarray

function db_fetch_numarray(&$qhandle) {
	$row=array();
	odbc_fetch_into($qhandle,$row);
	return $row;
}
开发者ID:helbertfurbino,项目名称:sgmofinanceiro,代码行数:5,代码来源:dbconnection.odbc.php

示例15: fetchInto

 function fetchInto($result, &$row, $fetchmode, $rownum = null)
 {
     $row = array();
     if ($rownum !== null) {
         $rownum++;
         // ODBC first row is 1
         if (version_compare(phpversion(), '4.2.0', 'ge')) {
             $cols = odbc_fetch_into($result, $row, $rownum);
         } else {
             $cols = odbc_fetch_into($result, $rownum, $row);
         }
     } else {
         $cols = odbc_fetch_into($result, $row);
     }
     if (!$cols) {
         /* XXX FIXME: doesn't work with unixODBC and easysoft
                          (get corrupted $errno values)
            if ($errno = odbc_error($this->connection)) {
                return $this->RaiseError($errno);
            }*/
         return null;
     }
     if ($fetchmode !== DB_FETCHMODE_ORDERED) {
         for ($i = 0; $i < count($row); $i++) {
             $colName = odbc_field_name($result, $i + 1);
             $a[$colName] = $row[$i];
         }
         if ($this->options['optimize'] == 'portability') {
             $a = array_change_key_case($a, CASE_LOWER);
         }
         $row = $a;
     }
     return DB_OK;
 }
开发者ID:noikiy,项目名称:owaspbwa,代码行数:34,代码来源:odbc.php


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