ora_getcolumn

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

ora_getcolumn -- 取得列的数据

描述

string ora_getcolumn ( resource cursor, int column )

取得一列数据。

返回列的数据。如果有错误产生,返回 FALSE 函数 ora_errorcode() 将返回一个非零值。注意,对该函数的一个 FALSE 测试有可能返回 TRUE 因为下列情况没有错误(NULL 结果,空的字符串,数字 0,字符串 "0")。


add a note add a note User Contributed Notes
Markus dot Elfring at web dot de
31-May-2002 07:41
The functions "OCINewDescriptor" and "OCILoadLob" seem to be better for special datatypes like "CLOB" or "BLOB".
leon at leonatkinson dot com
06-Jul-1999 06:29
If you are using LONG RAW columns, keep in mind that this function can return up to 64K of data, a limit that's hardcoded into the "DB_SIZE" constant inside "functions/oracle.c".
Brian dot Craigie at necs dot demon dot co dot uk
24-Feb-1999 07:10
The column number starts at zero.

The number of columns may be obtained by a call to the (undocumented) function:

$ncols=ora_numcols($cur);

after ora_exec($cur) has been performed.

Correction:
ora_numrows($cur); returns the current row number.

To find out how many rows you will have, you need to do a 'select count(*)...' query first and read back the result.