ADOdb

Database Abstraction Layer for PHP

User Tools

Site Tools


v5:reference:recordset:fieldcount

This is an old revision of the document!


fieldCount

Syntax
int fieldCount(){}

Description

The function fieldCount() returns the number of columns in a row of a recordset.

Usage

 
$SQL = "SELECT * FROM emp";
$recordSet = $conn->Execute($SQL);
$cols = $recordSet->fieldCount();
for($i=0;$i<$cols;$i++){
    $fld = $f->FetchField($i);
    print_r($fld);
    $t = $f->MetaType($fld->type);
    print_r($t);
}
v5/reference/recordset/fieldcount.1452987580.txt.gz · Last modified: 2017/04/21 11:37 (external edit)