ADOdb

Database Abstraction Layer for PHP

User Tools

Site Tools


v5:reference:recordset:fieldcount

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.txt · Last modified: 2016/01/17 00:39 by mnewnham