Select bulk from PHP code

Hi,
Is it possible to do a kind of select bulk from PHP ?
In my case, when I retrieve lot of data from a table and display it, I use a basic select but I can see the page is loading gradually.
I think if I am using the equivalent of a select bulk it would load all in one way.
Does anyone has an idea or advice ?
Best regards.

Yeah I am echoing each line it returns.
Even if I use prefetch 3000 it look like same !
$stmt_select = ociparse($connect, $query);
          oci_set_prefetch($stmt_select, 3000);
          oci_execute($stmt_select,OCI_DEFAULT);
          while ($select = oci_fetch_array ($stmt_select, OCI_BOTH))
               $remote_img = $select['REMOTE_IMG'];
               $text = $select['TEXT'];
               $count = $count + 1;
               echo '<table>';
                    echo '<tr>';
                         echo '<td>';
                              echo '<img src="' . $remote_img . '" width="100">';
                         echo '</td>';
                         echo '<td>';
                              $desc = str_replace('<br>', '-',$text);
                              $desc = str_replace(' ', '-',$desc);
                         echo $text;
                         echo '</td>';
                    echo '</tr>';
               echo '<table>';
          }

Similar Messages

  • Disable the Dynamic Selection Icon from T.Code FBL1N

    Hi,
    I want to disable the Dynamic Selection Icon from T.Code FBL1N...
    Please Note that i found a link where some code is given for this problem.
    Remove the dynamic selection screen.......
    Please tell me where i paste that code....after initialization or where....
    Thanks...
    Edited by: Prince Kumar on May 16, 2009 8:59 AM

    Hi,
    1) COPY the program RFITEMAP and create a ZRFITEMAP
    2) and added this code in the INITILIZATION event. You can search ZRFITEMAP with INITIALIZATION and add below code there.
      INTIALIZATION.
      DATA: t_exclude TYPE STANDARD TABLE OF sypfkey.
      APPEND 'DYNS' TO t_exclude.
      "DYNS is the dynamic selection screen function code.
      CALL FUNCTION 'RS_SET_SELSCREEN_STATUS'
        EXPORTING
          p_status        = sy-pfkey
        TABLES
          p_exclude       = t_exclude
    Regards
    Shital

  • Limitation on SQL executing select statement from ADO and Oracle 8.1.7.1 OleDB Driver

    Hi,
    we are running a query with a big dunamic select statement from VB code using ADO command object. When Execute method is called system hangs and control won't return back to the application. it seems to be that there is some type limitation on Query string length. Please tell us if there is any?
    we are running Oracle 8.1.7 Server on Windows 200 Server and connecting from a W2K professional, ADO 2.6 and Oracle OLEDB 8.1.7.1 OLEDB Driver.
    Sample code:
    Dim rs As ADODB.Recordset
    Dim cmd As ADODB.Command
    Set cmd = New Command
    With cmd
    .CommandText = ' some text with more than 2500 characters
    .CommandType = adCmdText
    Set rs = .Execute
    End With
    when i debug using VB6 and when .Execute line is called system hangs or return a message method <<somemethod> of <<some class name>> failed error.
    Any help is appreciated.
    Thanks,
    Anil

    A stored procedure would only slow you down here if it was poorly written. I suspect you want to use the translate function. I'm cutting & pasting examples from the documentation-- a search at tahiti.oracle.com will give you all the info you'll need.
    Examples
    The following statement translates a license number. All letters 'ABC...Z' are translated to 'X' and all digits '012 . . . 9' are translated to '9':
    SELECT TRANSLATE('2KRW229',
    '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ',
    '9999999999XXXXXXXXXXXXXXXXXXXXXXXXXX') "License"
    FROM DUAL;
    License
    9XXX999
    The following statement returns a license number with the characters removed and the digits remaining:
    SELECT TRANSLATE('2KRW229',
    '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ', '0123456789')
    "Translate example"
    FROM DUAL;
    Translate example
    2229
    Also, LIKE '%<string>%' is going to be rather expensive simply because it has to compare the entire string and because it forces full table scans, rather than using indexes. You could speed this sort of query up by using interMedia Text (Oracle Text now in 9i). If you can eliminate one of the '%' options, you could also improve things.
    My guess is that your stored procedure is inefficient and that's causing the problem-- 5k rows per table should be pretty trivial.
    If you post your query over on the PL/SQL forum, there are better performance tuners than I that might have more hints for you. To get really good advice, though, you'lllikely have to get at least the execution plan for this statement and may need to do some profiling to identify the problem areas.
    Justin

  • Webserver 7.0.9 make SOAP calls from PHP

    Hi,
    Making SOAP calls from PHP code uses opensll lib.
    On a windows server you should use : extension=php_openssl.dll in the php.ini file
    I tested it with a Ubuntu server using apache 2.2 , soap call is working from php code
    On Solaris 10 using iplanet 7.0.9 we have the following error : (see below)
    Does someone knows how to enable ?
    Thx , Ivan
    [27/Dec/2010:12:16:04] failure ( 7143): for host 10.66.10.46 trying to GET /ciscowebdialer/dialer.php?line=4012&destination=4014&deviceName=SEP002699EDDAE2, responder-fastcgi reports: FCGI1080: application error: PHP Notice: SoapClient::SoapClient() [function.SoapClient-SoapClient]: Unable to find the wrapper &quot;https&quot; - did you forget to enable it when you configured PHP? in /opt/oracle/webserver7/https-sol8/web-app/sol8/ciscowebdialer/dialer.php on line 6
    PHP Warning: SoapClient::SoapClient() [function.SoapClient-SoapClient]: I/O warning : failed to load external entity &quot;https://10.32.122.254:8443/webdialer/services/WebdialerSoapService?wsdl&quot; in /opt/oracle/webserver7/https-sol8/web-app/sol8/ciscowebdialer/dialer.php on line 6
    PHP Fatal error: SOAP-ERROR: Parsing WSDL: Couldn't load from 'https://10.32.122.254:8443/webdialer/services/WebdialerSoapService?wsdl' in /opt/oracle/webserver7/https-sol8/web-app/sol8/ciscowebdialer/dialer.php on line 6
    PHP Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: Couldn't load from 'https://10.32.122.254:8443/webdialer/services/WebdialerSoapService?wsdl' in /opt/oracle/webserver7/https-sol8/web-app/sol8/ciscowebdialer/dialer.php:6
    Stack trace:
    #0 /opt/oracle/webserver7/https-sol8/web-app/sol8/ciscowebdialer/dialer.php(6): SoapClient->SoapClient('https://10.32.1...', Array)
    #1 /opt/oracle/webserver7/https-sol8/web-app/sol8/ciscowebdialer/dialer.php(31): MakeCall('4012', '4014', 'SEP002699EDDAE2')
    #2 {main}
    thrown in /opt/oracle/webserver7/https-sol8/web-app/sol8/ciscowebdialer/dialer.php on line 6

    did you compile php by yourselves ? if yes, did you compile it with openssl support ? pl. make sure it is the case by running a simple script echoing phpinfo() .
    - sriram

  • Firefox 3 displays the php code when pages launched from dreamweaver 8

    The problem seems to relate to files opening as —
    file:///C:/localweb/ .... when sent from Dreamweaver 8.0 to Firefox
    The first html/php page loads correctly from dreamweaver as
    processed HTML, a second page linked from either an HTML or php
    page also loads correctly, but selecting any link from that or
    subsequent pages displays the full php code instead of processed
    html layout - so this appears to be a third level or greater
    problem.
    If I manually substitute -
    http://localhost/ — the problem
    does not arise.
    This is a problem with version 3 of firefox, all previous
    versions I used worked fine with both — file:///C:/localweb/
    and
    http://localhost/
    Both prefixes also appear with pure HTML sites, but they load
    and function correctly.
    Not every php site I have loads with file:///C:/localweb/, so
    I am wondering if this relates to something in the php code or
    Dreamweaver - I have conn.php set to:
    mysql_connect("localhost", "root", "") or die(mysql_error());
    I use winxp and have xampp installed - everything worked fine
    until I installed Firefox 3

    > but selecting any link from that or subsequent pages
    You are being confused by a) not understanding root relative
    vs document
    relative links, and b) not understanding how DW previews
    files.
    If I have a document with a link to an image that looks like
    this -
    <img src="/images/foo.gif"...
    That's what's called a root relative link.
    If I preview that document in DW, then the browser gets the
    document, sees
    the leading "/" and reads that as the root of the hard drive,
    since the
    browser has no idea where the root of the site is. Thus, the
    image is
    broken in the preview.
    If I have temp files enabled, then DW will secretly convert
    the file being
    previewed into a temporary file, and hand that to the
    browser. This temp
    file has had all root relative links converted to document
    relative links
    (as you will see by looking at the code in the browser), and
    has had all
    include files actually embedded in the page, and has had all
    external CSS
    and js markup embedded in the page. In other words, DW has
    made the
    document into a stand-alone page.
    If you do not have temp files enabled, all of these links
    would be broken on
    preview.
    Now - if you are using root relative links, AND you have temp
    files enabled,
    AND you click away from the previewed document, then all of
    your links will
    be broken, since DW has not made that linked file into a temp
    file. This is
    what you are seeing.
    So - if you want to click away on preview, then you must use
    document
    relative links for the site -
    <img src="../images/foo.gif"... (for example)
    These will still work on preview since the browser knows how
    to determine
    the current file's location and how to follow that path.
    Make sense?
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    ==================
    "gbiras" <[email protected]> wrote in
    message
    news:[email protected]...
    > The problem seems to relate to files opening as ?
    file:///C:/localweb/
    > ....
    > when sent from Dreamweaver 8.0 to Firefox
    >
    > The first html/php page loads correctly from dreamweaver
    as processed
    > HTML, a
    > second page linked from either an HTML or php page also
    loads correctly,
    > but
    > selecting any link from that or subsequent pages
    displays the full php
    > code
    > instead of processed html layout - so this appears to be
    a third level or
    > greater problem.
    >
    > If I manually substitute -
    http://localhost/ ? the problem does
    not arise.
    >
    > This is a problem with version 3 of firefox, all
    previous versions I used
    > worked fine with both ? file:///C:/localweb/ and
    http://localhost/
    >
    > Both prefixes also appear with pure HTML sites, but they
    load and function
    > correctly.
    >
    > Not every php site I have loads with
    file:///C:/localweb/, so I am
    > wondering
    > if this relates to something in the php code or
    Dreamweaver - I have
    > conn.php
    > set to:
    >
    > mysql_connect("localhost", "root", "") or
    die(mysql_error());
    >
    > I use winxp and have xampp installed - everything worked
    fine until I
    > installed Firefox 3
    >

  • Need sample code to get handle of Selected rows from ADF Table

    Hi,
    I am new to ADF. I have an ADF table based on VO object.On some button action,I need to get handle of selected rows in application module.
    If anybody is having sample code to do this then please share with me.
    Thanks,
    ashok

    wow now link http://blogs.oracle.com/smuenchadf/examples/#134 is working.thanks a lot.
    also the link http://baigsorcl.blogspot.com/2010/06/deleting-multi-selected-rows-from-adf.html is very useful. Thanks a lot for Sameh Nassar too.He made it clear that in 11g Select column is not available for a ADF table and provided a solution to get Select column.
    Thanks,
    ashok

  • How can I fill a table of objects from cursor with select * bulk collect???

    Hi All, I have a TYPE as OBJECT
    create or replace type dept2_o as object (
    deptno NUMBER(2),
    dname VARCHAR2(14),
    loc VARCHAR2(13));
    I can fill a table of objects from cursor with out select * bulk collect...., row by row
    declare
    TYPE dept2_t IS TABLE of dept2_o;
    dept_o_tab dept2_t:=dept2_t();
    i integer;
    begin
    i:=0;
    dept_o_tab.extend(20);
    for rec in (select * from dept) loop
    i:=i+1;
    dept_o_tab(i):=dept2_o(
    deptno => rec.deptno,
    dname => rec.dname,
    loc =>rec.loc
    end loop;
    for k IN 1..i loop
    dbms_output.put_line(dept_o_tab(k).deptno||' '||dept_o_tab(k).dname||' '||dept_o_tab(k).loc);
    end loop;
    end;
    RESULT
    10 ACCOUNTING NEW YORK
    20 RESEARCH DALLAS
    30 SALES CHICAGO
    40 OPERATIONS BOSTON
    But I can't fill a table of objects from cursor with select * bulk collect construction ...
    declare
    TYPE dept2_t IS TABLE of dept2_o;
    dept_o_tab dept2_t:=dept2_t();
    begin
    dept_o_tab.extend(20);
    select * bulk collect into dept_o_tab from dept;
    end;
    RESULT
    ORA-06550: line 6, column 39;
    PL/SQL: ORA-00947: not enough values ....
    How can I fill a table of objects from cursor with select * bulk collect???

    create or replace type dept_ot as object (
    deptno NUMBER(2),
    dname VARCHAR2(14),
    loc VARCHAR2(13));
    create table dept
    (deptno number
    ,dname varchar2(14)
    ,loc varchar2(13)
    insert into dept values (10, 'x', 'xx');
    insert into dept values (20, 'y', 'yy');
    insert into dept values (30, 'z', 'zz');
    select dept_ot (deptno, dname, loc)
      from dept
    create type dept_nt is table of dept_ot
    declare
       l_depts dept_nt;
    begin
       select dept_ot (deptno, dname, loc)
         bulk collect
         into l_depts
         from dept
       for i in l_depts.first .. l_depts.last
       loop
          dbms_output.put_line (l_depts(i).deptno);
          dbms_output.put_line (l_depts(i).dname);
          dbms_output.put_line (l_depts(i).loc);    
       end loop;
    end;
    /

  • How can i call the certificate selection dialog box from source code?

    How can i call the certificate selection dialog box from source code?
    NB: Of course if i have more than one certificate in the Microsoft Keystore 'My'.
    Thank You in advance

    I found an example of the "TestStand UI Expression Control.ctl" and it works just the way I need it. (check the link)
    Proper use of "TestStand UI ExpressionEdit Control" in LabVIEW http://forums.ni.com/ni/board/message?board.id=330&requireLogin=False&thread.id=10609 
    The "Expression Browser Dialog Box Button" F(x) stays disable while editing the VI, however it become available when the VI is called from TestStand.
    Thank you,
    Hecuba
    Mfg. Test Engineer
    Certified LabVIEW Associate Developer

  • PHP code disappearing from Muse html

    I'm having an odd error that I'm hoping someone can help me with.
    I am using Adobe Muse and a server side CMS called Pulsepro. To run the CMS modules all I have to do is paste an embed line like the following:
    <?php include("pulsepro/includes/gallery2.php"); ?>
    I am placing this php code in an HTML snippet in muse and then exporting and uploading to server. On the server I have an .htaccess file with the following lines of code to make sure that the browser can find the PHP:
    AddType application/x-httpd-php .html .htm
    AddHandler application/x-httpd-php .html .htm
    When I go to my page, where the php should be is blank. Upon viewing source code it shows that the php include is completed deleted and just has a blank DIV. Now, the local file on my machine (the export from Muse) shows the correct php include line. Why is it that when the browser runs the code it removes the php code from the HTML file? If I put the same php line in a simple html file it runs fine.
    Help? I've never had this issue with anything other than Muse.
    Best,
    Oliver

    Browsers do not find or process PHP. PHP is found and processed by the server before it hits your browser.
    The reason why you may not see anything where you placed the PHP is that it is unable to locate "pulsepro/includes/gallery2.php" or that included PHP file is simply rendering nothing. 
    What happens when you call "pulsepro/includes/gallery2.php" directly in your browser? Does it display anything?

  • Translate code from PHP to Coldfusion (SHA1 Encryption)

    Hi everyone,
    I have this bit of code in PHP which I want to do in Coldfusion but I have no idea. Can anyone help me out with this one?
    Will the IC_Checksum value be the same in Coldfusion as it would be in PHP?
    PHP Code:
    $IC_CheckSum = SHA1($Encryptioncode . "|" . IC_Currency . "|" . IC_PaymentMethod . "|" . IC_Issuer);
    Coldfsuion Code:
    Thanks!

    I see, so you want to hash a value? Have you tried the ambiguously-named hash() function?
    Adobe Docs
    And yes, two identical strings hashed in an identical algorithm should be identical regardless of the technology that did the work.

  • A difficult problem with php code and sql code

    it's good place to visit(Paged Result Sets with PHP and Oracle)
    http://www.oracle.com/technology/pub/articles/oracle_php_cookbook/fuecks_paged.html
    maybe below part php code could not be used in above address's php code.
    if((isset($l_company) and $l_company != $rows['COMPANY']) or empty($stmt) and empty($total_pages) ) {
    echo "<tr bgcolor='#CCFFCC'>";
    echo "<td colspan= 3 align='center'>".$l_company."</td>";
    echo "<td >".$totalcomany." </td>";
    $totalcomany = 0;
    echo "<td > </td>";
    echo "</tr>";
    $l_company = $rows['COMPANY'];
    because the same company in one page could calculate sum while if
    the same company in two pages could not do that.
    and what do you think of ?
    thanks !

    Hi,
    this is because your sql-statement selects only the rows, you need to build this one page.
    Neither php nor the given result from your query knows about data wich will be part of the result of another page.
    Greetings from Hamburg
    Thorsten Körner

  • How to write this sql query in php code ?

    for example:
    insert into temp
    select *
    from testtable;
    after this, i will query data from sql below:
    select *
    from temp;
    how to write this php code ?
    who can help me ?
    thanks!

    Have a look at the manual to find out how to issue queries.
    http://us3.php.net/oci8

  • How to call PL/SQL function from php

    I have one function define in package,like below
    >>
    create or replace package body Intg$Label_DB as
    Future constant date := to_date ('21990101', 'YYYYMMDD');
    Max_Annotation_Len integer := 3995;
    function Get_Tagged_Label (Product_Name varchar2,Branch_Name varchar2, Platform_Name varchar2, Schema_Name varchar2) return varchar2 is
    Series_Id integer := Get_Series (Product_Name,Branch_Name,Platform_Name);
    Schema_Id integer := Get_Schema (Schema_Name);
    Dep_Label_Id integer;
    Next_Dep_Label_Id integer;
    Result_Id integer;
    Result Intg$Labels.Name%type;
    begin
    select SLT.Dep_Label_Id, SLT.Next_Dep_Label_Id into Dep_Label_Id, Next_Dep_Label_Id
    from Intg$Series_Label_Tags SLT
    where SLT.Series_Id = Get_Tagged_Label.Series_Id and SLT.Schema_Id = Get_Tagged_Label.Schema_Id;
    Result_Id := Next_Dep_Label_Id;
    if Result_Id = -1 then
    Result_Id := Dep_Label_Id;
    end if;
    select L.Name into Result from Intg$Labels L where L.Id = Result_Id;
    return Result;
    exception
    when NO_DATA_FOUND then
    return '';
    end Get_Tagged_Label;
    >>
    i want to call Get_Tagged_Label() from php and print the output,I tried below code but seems i am missing lots of things here.Any help will be appreciate.
    $sql = 'BEGIN INTG$Label_DB.Get_Tagged_Labell(:Product_Name,:Branch_name,:Platform_Name,:message,:message_1,:message_2); END;';
    $stmt = oci_parse($conn,$sql) or die ('Can not parse query') ;
    // Bind the input parameter
    oci_bind_by_name($stmt,':Product_Name',$name,32);
    oci_bind_by_name($stmt,':Branch_name',$branch,32);
    oci_bind_by_name($stmt,':Platform_Name',$pt,32);
    // Bind the output parameter
    oci_bind_by_name($stmt,':message',$message,32);
    oci_bind_by_name($stmt,':message_1',$message_1,32);
    oci_bind_by_name($stmt,':message_2',$message_2,32);
    // Assign a value to the input
    $name = 'PCBPEL';
    $branch ='MAIN';
    $pt ='GENERIC';
    oci_execute($stmt);
    Thanks
    Hridyesh

    What errors are you getting?
    It's always helpful to know the version of PHP and the database.
    When calling a function, you'll need a bind variable to hold the return value, and make sure the number of parameters match:
    $sql = 'BEGIN :rv := INTG$Label_DB.Get_Tagged_Labell(:Product_Name,:Branch_name,:Platform_Name,:message); END;';
    This new variable will need to bound with oci_bind_by_name()
    Have you looked at my free Underground PHP and Oracle Manual at http://www.oracle.com/technology/tech/php/pdf/underground-php-oracle-manual.pdf ? Or any one of the other fine PHP-Oracle books available?

  • Select data from plsql collections

    Hi All,
    I am not a developer but working as a DBA, so not very much familiar with pl/sql, still gone through with documentation and could come up with some solution of my problem. I need some expert advice here.
    Problem : I am writing down some kind of plsql program for monitoring of some special batch job, I know we have lot of other option to do the same including db/grid control ..etc but for some
    reason i have to do this using plsql only.
    Requirement : my requirement is to select data from table in plsql and then should have ability to query it again and again. I would not prefer to go to table rather than directly from plsql..
    I wrote down below code for sample, bulk collect data into collection type and can print using for loop.
    Declare
    type ts is table of v$session%rowtype index by pls_integer;
    tsess ts;
    begin
    select * bulk collect into tsess from v$session ;
    for i in 1..tsess.count loop
    dbms_output.put_line(tsess(i).terminal);
    end loop;
    end;
    But, is there any way same collection ( tsess in above example ) can be queried using select statement like 'select * from table ( Tsess ) ' I have searched on net and found this can be done using creating type at database level. But my problem is I can not create any object in database as being it is a production one.
    I was looking for if is there any way same can be accomplished ... like cast / multiset .. however, I could not get it through.
    your help would be appreciated !!
    Regards,

    I don't think you need to use arrays here, only SQL, have a look at subquery factors and report back if that is insufficient...
    Edited by: BrendanP on 12-Feb-2012 03:07 to add an example:
    I gather that you want to 'requery' data that you have already got from the database purely to be able to use SQL functionality such as ORDER BY in multiple ways. Here is how you can do this in the original SQL for one particular example, where you want to query v$sql ordering by CPU time and by disk reads separately (I tested this but the output won't look good here, so omitting it):
    WITH v AS (
    SELECT
        Substr (sql_text,1,500)             sql_text,
        cpu_time/1000000                    cpu_seconds,
        disk_reads,
        buffer_gets,
        executions,
        CASE WHEN rows_processed != 0 THEN Round( buffer_gets / Nvl (Replace (rows_processed, 0, 1) ,1)) END Buffer_gets_rows_proc,
        Round (buffer_gets / Nvl (Replace (executions, 0, 1), 1)) Buffer_gets_executions,
        elapsed_time / 1000000              elapsed_second,
        module
    FROM v$sql s)
    SELECT
        'CPU'                order_by,
        cpu_seconds          order_val,
        sql_text,
        cpu_seconds,
        disk_reads,
        buffer_gets,
        executions,
        buffer_gets_rows_proc,
        buffer_gets_executions,
        elapsed_second,
        module
    FROM v
    UNION
    SELECT
        'Disk reads',
        disk_reads,
        sql_text,
        cpu_seconds,
        disk_reads,
        buffer_gets,
        executions,
        buffer_gets_rows_proc,
        buffer_gets_executions,
        elapsed_second,
        module
    FROM v
    ORDER BY order_by, order_val DESC

  • Sql code with php code

    for example:
    create table testtable (
    sales_area varchar2(30),
    sales_comp varchar2(40),
    sales_market varchar2(30),
    order_number number(20),
    order_date varchar2(20),
    item_id number(15),
    quantity number(20),
    item_desc varchar2(50)
    insert into testtable values ('westarea','acompany','amarket','52001',1001,1,10,'apple');
    insert into testtable values ('westarea','acompany','amarket','52005',1002,2,20,'banana');
    insert into testtable values ('eastarea','bcompany','bmarket','52002',1003,2,50,'banana');
    insert into testtable values ('eastarea','bcompany','bmarket','52004',1006,1,30,'apple');
    insert into testtable values ('eastarea','bcompany','bmarket','52003',1007,1,30,'apple');
    insert into testtable values ('westarea','ccompany','cmarket','52006',1003,1,30,'orange');
    insert into testtable values ('westarea','ccompany','dmarket','52007',1004,3,60,'orange');
    commit;
    select *
    from testtable
    it outputs below:
    westarea     acompany     amarket     52001     1001     1     10 apple
    westarea     acompany     amarket     52005     1002     2     20 banana
    eastarea     bcompany     bmarket     52002     1003     2     50 banana
    eastarea     bcompany     bmarket     52004     1006     1     30 apple
    eastarea     bcompany     bmarket     52003     1007     1     30 apple
    westarea     ccompany     cmarket     52006     1003     1     30 orange
    westarea     ccompany     dmarket     52007     1004     3     60 orange
    use php code outputs like below php code :
    apple banana orange .......
    westarea     acompany     amarket     52001     1001     10
    westarea     acompany     amarket     52005     1002     20 ........
    acompany 10 20 .........
    westarea     ccompany     cmarket     52006     1003          30 .........
    westarea     ccompany     dmarket     52007     1004          60 .........
    ccompany 90 .........
    westarea 10 20 90 .........
    eastarea     bcompany     bmarket     52002     1003     50 .........
    eastarea     bcompany     bmarket     52004     1006     30 .........
    eastarea     bcompany     bmarket     52003     1007     30 .........
    bcompany 60 50 .........
    eastarea
    total 70 70 90 ......
    make below php code output a new table:
    <?php
    $v_item_count = count(array(item));
    echo"<table border = 1>";
    echo "<tr>";
    echo "<td rowspan="2">sales area</td>";
    echo "<td rowspan="2">sales comp</td>";
    echo "<td rowspan="2">sales market</td>";
    echo "<td rowspan="2">customer_number</td>";
    echo "<td rowspan="2">order_number</td>";
    echo "<td colspan="'||to_char($v_item_count)||'">categories and quantities</td>";
    while ($row = oci_fetch_array ($stmt, OCI_BOTH)) {
    echo "<tr>";
    echo "<td>".$row['ORDER_NUMBER']."</td>";
    ?>
    who can help me?

    for example:
    while ($row = oci_fetch_array ($stmt, OCI_BOTH)) {
    echo "<tr>";
    echo "<td>".$row['ORDER_NUMBER']."</td>";
    echo "<td>".$row['ORDERED_DATE']."</td>";
    for ($i=0; $i<sizeof($items); $i++) {
    echo "<td>".$row[$i]." </td>";
    echo "</tr>";
    echo "</table>";
    ?>
    above php code should output plentites of lines while it output few lines.
    i don't know there has many lines outputed?
    who can help me?

Maybe you are looking for