Delicious Bookmark this on Delicious Share on Facebook SlashdotSlashdot It! Digg! Digg



PHP : Function Reference : Oracle Functions [deprecated] : ora_getcolumn

ora_getcolumn

Get data from a fetched column (PHP 4, PHP 5 <= 5.0.5)
string ora_getcolumn ( resource cursor, int column )

Fetches the data for a column or function result.

Parameters

cursor

An Oracle cursor, opened with ora_open().

column

The column number, as an integer.

Return Values

Returns the column data. If an error occurs, FALSE is returned and ora_errorcode() will return a non-zero value. Note, however, that a test for FALSE on the results from this function may be TRUE in cases where there is not error as well (NULL result, empty string, the number 0, the string "0").

ChangeLog

Version Description
5.1.0

The oracle extension is deprecated in favor of oci8.

Notes

When using oci8 as a replacement for the deprecated oracle extension, consider using:

oci_result()

Code Examples / Notes » ora_getcolumn

markus dot elfring

The functions "OCINewDescriptor" and "OCILoadLob" seem to be better for special datatypes like "CLOB" or "BLOB".

brian dot craigie

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.


leon

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".

Change Language


Follow Navioo On Twitter
ora_bind
ora_close
ora_columnname
ora_columnsize
ora_columntype
ora_commit
ora_commitoff
ora_commiton
ora_do
ora_error
ora_errorcode
ora_exec
ora_fetch_into
ora_fetch
ora_getcolumn
ora_logoff
ora_logon
ora_numcols
ora_numrows
ora_open
ora_parse
ora_plogon
ora_rollback
eXTReMe Tracker