previousDB_result::nextResult() (Previous) (Next) DB_result::numRows()next

View this page in Last updated: Sun, 18 Oct 2009
English | Brazilian Portuguese | Chinese | Dutch | French | German | Hungarian | Japanese | Polish | Russian | Spanish | Turkish

DB_result::numCols()

DB_result::numCols() – Gets number of columns in a result set

Synopsis

integer numCols ( )

Description

Get the number of columns of the rows in a result set.

Return value

integer - number of columns or a DB_Error object on failure

Note

This function can not be called statically.

Example

Using numCols()

<?php
// Once you have a valid DB object named $db...
$res =& $db->query('SELECT * FROM phptest');
echo 
$res->numCols();
?>
previousDB_result::nextResult() (Previous) (Next) DB_result::numRows()next

Download Documentation Last updated: Sun, 18 Oct 2009
Do you think that something on this page is wrong? Please file a bug report or add a note.
User Notes:
There are no user contributed notes for this page.