ora_numcols

(PHP 3, PHP 4, PHP 5 <= 5.1.0RC1)

ora_numcols -- Returns the number of columns

Description

int ora_numcols ( resource cursor )

ora_numcols() returns the number of columns in a result. Only returns meaningful values after an parse/exec/fetch sequence.

See also ora_parse(),ora_exec(), ora_fetch(), and ora_do().



ora_numcols
tim dot mcguire at dnr dot state dot mn dot us
21-Aug-2001 06:30
I would like to correct the above documentation.  I am able to get results from ora_numcols after a parse & exec sequence and before a fetch:
ora_parse($curs,$query);
ora_exec($curs);

$numfields = ora_numcols($curs);

for($col=0;$col<$numfields;$col++){
  echo ora_columnname($curs,$col);
}
while(ora_fetch($curs)){
etc.........................
}

<ora_logonora_numrows>
 Last updated: Tue, 15 Nov 2005