Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

OCIFetchStatement arguments- Oracle

Status
Not open for further replies.

namida

Programmer
May 29, 2003
101
0
0
AU
I am using PHP 4.1.1 and 4.3.1

according to the manual, the function OCIFetchStatement have 2-5 arguments which are

ocifetchstatement ( resource stmt, array &output [, int skip [, int maxrows [, int flags]]])

But when I tried this in my code
Code:
OCIFetchStatement($this->res,&$this->rows,0,-1,OCI_FETCHSTATEMENT_BY_ROW);
it says "Wrong parameter count for ocifetchstatement() "

So I reduced it into 4 (actually I need the 5th parameter more than the 4th or the 3rd)

Code:
OCIFetchStatement($this->res,&$this->rows,0,-1);

it still says Wrong Parameter count

Then I tried 3 :
Code:
OCIFetchStatement($this->res,&$this->rows,0);

and it works.

it works with 2 parameters as well.

I want to use the 5th parameter which is the flags parameter where I can request the result to be Fetched by Rows.

Anyone have this experience before?


Regards,

Namida
 
Off topic for the question but:
4.1.1 seems really outdates and 4.3.1 is also quite some time ago. If you can you really should upgrade your PHP installations.
 
Yes I agree 4.1.1 is very outdated.
Our server uses 4.3.1 It's just that I was testing the script in 4.1.1

Apparently the function doesn't work with the 5 parameters in 4.1.1 .

Regards,

Namida
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top