★ wanayoo — archive 1999 http://www.php.net/manual/function.ora-getcolumn.phpNouvelle recherche | Portail wanayoo

PHP Home Page

Manual Table of Contents
Up to Oracle
Quick Reference
German version of this pageJapanese version of this pageItalian version of this pageFrench version of this pageHungarian version of this page
Oracle
* Ora_Bind
* Ora_Close
* Ora_ColumnName
* Ora_ColumnType
* Ora_Commit
* Ora_CommitOff
* Ora_CommitOn
* Ora_Error
* Ora_ErrorCode
* Ora_Exec
* Ora_Fetch
* Ora_GetColumn
* Ora_Logoff
* Ora_Logon
* Ora_Open
* Ora_Parse
* Ora_Rollback
Manual: Ora_GetColumn
View the source code for this pageSearch the site



Previous page
 Ora_Fetch
 Updated
Sat, 12 Aug 2000
Ora_Logoff 
Next page


Ora_GetColumn

(unknown)

Ora_GetColumn -- get data from a fetched row

Description

mixed ora_getcolumn (int cursor, mixed column)

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"). Fetches the data for a column or function result.


User Contributed Notes: Ora_GetColumn


Brian.Craigie@necs.demon.co.uk
23-Feb-1999 03:10
The column number starts at zero.

The number of columns may be obtained by a call to the (undocumented) function:
<PRE>
$ncols=ora_numcols($cur);
</pre>

after <PRE>ora_exec($cur)</PRE> has been performed.

The number of rows is obtained from (undocumented)function:
<PRE>
$nrows = ora_numrows($cur);
</PRE>
after an <PRE>ora_fetch($cur);</PRE>



Brian.Craigie@necs.demon.co.uk
24-Feb-1999 11:48
Correction:
<pre>ora_numrows($cur);</pre> 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@leonatkinson.com
05-Jul-1999 03: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".


andy@twilight.at
16-Sep-1999 08:41
I have some problem.
after the query
$query = sprintf("select name,ort,email from guestbook order by name");
ora_parse($curs, $query);
ora_exec($curs);
$ncols = ora_numcols($curs);
after this every timne i work with the varibale $ncols
i get an parse error, someone knows why?



alesi@ms21.hinet.net
07-Feb-2000 12:26
Dear All,
I am able to wrote php script to show my content on Oracle database, but it
doesn't show up any non-ascii charaters, Tranditional Chinese(big 5). With
the same machine I am able to show up my big 5 content if I call MySQL
database. I am sure that I haven't configure Oracle database wrong, coz I am
able to connect throught SQL*PLUS on another NT workstation which can get
the Chinese content.
Is there any place that I can set up the enviornment in Apache or PHP?
Thanks,
Alesi




thomas_winkler@mail.com
21-Feb-2000 07:15
If the syntax is
mixed ora_getcolumn(int cursor, mixed column);
and column must be a number, why is it defined as 'mixed'?

I want the following
..parse...Select a, b, c FROM X
..getcolumn($curs, "a");

"a" is mixed !!



div@ied.msu.ru
16-Mar-2000 07:01
I looked at source code of php3_Ora_GetColumn in php3.0.15 and found out the second argument uses only as converted to long.


 About Notes


Previous page
 Ora_Fetch
 Updated
Sat, 12 Aug 2000
Ora_Logoff 
Next page





Who's responsible for this?
Top of this page

Site
Hosting:



Located in
United States
Elements of this website are subject to copyright.
Questions about installing or using PHP should be directed to one of the mailing lists.
Only questions about the website should be directed to webmaster@php.net.