Home > Default > Where to loop: Oracle server side or PHP apache side?

Where to loop: Oracle server side or PHP apache side?

November 30Hits:0
Advertisement
Hi
my feeling is that Oracle will be the best place to loop, but I thought I would ask here.
Essentially I wish to return an array of results to PHP, and while this is not possible directly it can be done with a refcursor
TYPE cursortype IS REF CURSOR;
procedure findAllSorted(sortMode in string, resultSet IN OUT cursortype) is
will then give me myresult set that I can then loop through in PHP and obtain each of the rows returned
what I am interested to know is will there be any advantage to using a series of arrays as out parameters and then filling them inside oracle? Such as:
type statement_num_array is table of statement.statement_num%type index by pls_integer;
type statement_id_array is table of statement.statement_id%type index by pls_integer;
type statement_text_array is table of statement.statement_text%type index by pls_integer;
type statement_cat_array is table of statement.category_id%type index by pls_integer;
then passing this as out parameters to:
procedure findAllSorted(sortMode in string, statement_nums out statement_num_array....
this would mean there would be only one call to Oracle rather than repeated calls using the refcur in a loop
what I'm not sure is "which is better"
I'm tempted to think that the refcursor is the better way as it is perhaps at least more logical.

Answers

Hi
better is of course difficult. I would be after effectiveness and code consistency.
It seems to me that if I use bulk inserts (passing in an array) that I can only make my arrays column data, while when selecting in bulk I seem to only be able to work with refcursor which is essentially returning rows.

Read other 3 answers

Tags:

Related Articles

  • Where to loop: Oracle server side or PHP apache side?November 30

    Hi my feeling is that Oracle will be the best place to loop, but I thought I would ask here. Essentially I wish to return an array of results to PHP, and while this is not possible directly it can be done with a refcursor TYPE cursortype IS REF CURSO

  • Dynamic column name for Oracle Server ProcedureOctober 11

    hello, May be it's not a right place for my question, but I hope that some of you can help me. I have source table A that has data of the same kind in 62 fields, let's say employee count for 62 departments. I do some processing with these counts(sum(

  • Application is not working when changing of oracle server domain nameOctober 11

    Hi friends We decided to change oracle server domain name due to some reason .. we changed the domain name but application running on the other server cannot connect to this domain i don't know whats the problem . I change the enterprise manager ( em

  • Oracle Server 11.2.0.1.0 64-bit fails when invoked from InstallShieldOctober 11

    I'm trying to install the Oracle Server 11.2.0.1.0 64-bit on Windows 2008 SP1 from the InstallShield 2010. The installation is silent. Invoked by command line: J:\Oracle_11.2.0_x64\OracleServer_11.2.0.1_x64\setup.exe ORACLE_HOME_NAME="ARAXI_11"

  • ORACLE SERVER AND UNIX TP MONITOR-2October 11

    제품 : ORACLE SERVER 작성날짜 : 1995-01-24 Subject: Oracle Server and UNIX Transaction Processing Monitors-2 Page(3/4) This file contains commonly asked questions about Oracle7 Server and UNIX Transaction Processing Monitors (TPMs). The topics covered in t

  • How to run a script on Oracle server from isqlplusOctober 11

    Hi I am trying to run a script on my workstation from Oracle server through isqlplus workarea. I entered following command and get the following error. i have enabled isqlplus URL by editing web.xml file already. Can please someone help how to run th

  • ORACLE SERVER AND UNIX TP MONITOR-1October 11

    제품 : ORACLE SERVER 작성날짜 : 2002-05-17 ==================================================================== Subject: Oracle Server and UNIX Transaction Processing Monitors - 1 ===================================================================== PURPOS

  • Insert data 32K into a column of type LONG using the oracle server side jdbc driverOctober 11

    Hi, I need to insert data of more than 32k into a column of type LONG. I use the following code: String s = "larger then 32K"; PreparedStatement pstmt = dbcon.prepareStatement( "INSERT INTO TEST (LO) VALUES (?)"); pstmt.setCharacterStr

  • Error while importing dump file to Oracle serverOctober 11

    Hi All, I'm pretty new to Oracle and I need to do the following job: - import data from dump file to Oracle server - then export it into CSV format to load to our web system Oracle dump file is called EXPDAT.DMP and it is placed in the default locati

  • Problem with execution of  a forms in Intranet (IAS oracle Server)October 11

    Hi every body!!!! I have a serious problem, that i could not resolve for more than a week, it's awfull!!! my problem is that i have compiled certains forms V6 in IAS oracle server with using the command f60gen, when i call certain of my forms from a

Copyright (C) 2019 wisumpire.com, All Rights Reserved. webmaster#wisumpire.com 14 q. 0.991 s.