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


PHP adodb_getall函数代码示例

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


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

示例1: dl

<?php

dl('adodb.so');
include_once 'phplens/adodb/adodb.inc.php';
$db = ADONewConnection('mysql');
$server = 'jaguar';
$user = 'mobydick';
$password = $_GET['pwd'];
$database = 'northwind';
$db->Connect($server, $user, $pwd, $database);
$rs = $db->Execute('select productname,unitsinstock from products');
while (!$rs->EOF) {
    print_r($rs->fields);
    print HTML_BR;
    adodb_movenext($rs);
    ## ADODB extension function
}
$rs->Close();
echo '<hr/>';
$rs = $db->Execute("select productname, unitsinstock from products where productid < 5");
$arr = adodb_getall($rs);
## ADOdb extension function
echo '<pre>';
print_r($arr);
echo '</pre>';
开发者ID:BackupTheBerlios,项目名称:ol-commerce-svn,代码行数:25,代码来源:test-adodb.php

示例2: adodb_getall

 /**
  * return recordset as a 2-dimensional array.
  *
  * @param [nRows]  is the number of rows to return. -1 means every row.
  *
  * @return an array indexed by the rows (0-based) from the recordset
  */
 function &GetArray($nRows = -1)
 {
     global $ADODB_EXTENSION;
     if ($ADODB_EXTENSION) {
         $results = adodb_getall($this, $nRows);
         return $results;
     }
     $results = array();
     $cnt = 0;
     while (!$this->EOF && $nRows != $cnt) {
         $results[] = $this->fields;
         $this->MoveNext();
         $cnt++;
     }
     return $results;
 }
开发者ID:dasatti,项目名称:dashboard,代码行数:23,代码来源:adodb.inc.php

示例3: GetArray

 /**
  * return recordset as a 2-dimensional array.
  *
  * @param [nRows]  is the number of rows to return. -1 means every row.
  *
  * @return an array indexed by the rows (0-based) from the recordset
  */
 function GetArray($nRows = -1)
 {
     global $ADODB_EXTENSION;
     if ($ADODB_EXTENSION) {
         $results = adodb_getall($this, $nRows);
         return $results;
     }
     $results = array();
     $cnt = 0;
     while (!$this->EOF && $nRows != $cnt) {
         // $results[] = $this->fields;
         $rs = $this->fields;
         $keys = array_keys($rs);
         $new_rs = null;
         foreach ($keys as $key) {
             $new_rs[strtolower($key)] = $rs[$key];
         }
         $results[] = $new_rs;
         $this->MoveNext();
         $cnt++;
     }
     return $results;
 }
开发者ID:benvanstaveren,项目名称:movabletype,代码行数:30,代码来源:adodb.inc.php


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