Professional Web Applications Themes

PHP and returned values from Informix stored procedures - PHP Development

Does anyone know how to retrieve the values returned from an Informix Stored procedure in PHP. I have a procedure that returns 4 values but only 1 row. If I prepare it and then execute it I can not retrieve the results as all of the PHP functions seem to return an array based on the column names, wheras there is no column name associated with the return values. Alternatively is there any way to name the return values from a stored procedure. Thanks to any Informix/PHP gurus Steve Weet XPosted to comp.lang.php...

  1. #1

    Default PHP and returned values from Informix stored procedures

    Does anyone know how to retrieve the values returned from an Informix Stored
    procedure in PHP.

    I have a procedure that returns 4 values but only 1 row. If I prepare it and
    then execute it I can not retrieve the results as all of the PHP functions seem
    to return an array based on the column names, wheras there is no column name
    associated with the return values.

    Alternatively is there any way to name the return values from a stored procedure.

    Thanks to any Informix/PHP gurus





    Steve Weet
    XPosted to comp.lang.php

    Steve Weet Guest

  2. #2

    Default PHP and returned values from Informix stored procedures

    Does anyone know how to retrieve the values returned from an Informix Stored
    procedure in PHP.

    I have a procedure that returns 4 values but only 1 row. If I prepare it and
    then execute it I can not retrieve the results as all of the PHP functions seem
    to return an array based on the column names, wheras there is no column name
    associated with the return values.

    Alternatively is there any way to name the return values from a stored procedure.

    Thanks to any Informix/PHP gurus





    Steve Weet
    XPosted to comp.lang.php


    Steve Weet Guest

  3. #3

    Default Re: PHP and returned values from Informix stored procedures

    Not particularly pretty, but this function retrieves the
    values from the spl sp_mailsetup into $result, each elephant
    of $result is then access via $result['[Expr_1]'] etc

    $result=ifx_query("execute procedure sp_mailsetup('$ID')",$conn);
    if($result)
    {
    $row=ifx_fetch_row($result,'NEXT');
    print $result['[Expr_1]'];
    print $result['[Expr_2]'];
    }


    Steve Weet wrote:
    >
    > Does anyone know how to retrieve the values returned from an Informix Stored
    > procedure in PHP.
    >
    > I have a procedure that returns 4 values but only 1 row. If I prepare it and
    > then execute it I can not retrieve the results as all of the PHP functions seem
    > to return an array based on the column names, wheras there is no column name
    > associated with the return values.
    >
    > Alternatively is there any way to name the return values from a stored procedure.
    >
    > Thanks to any Informix/PHP gurus
    >
    > Steve Weet
    > XPosted to comp.lang.php
    --
    Paul Watson #
    Oninit Ltd # Growing old is mandatory
    Tel: +44 1436 672201 # Growing up is optional
    Fax: +44 1436 678693 #
    Mob: +44 7818 003457 #
    [url]www.oninit.com[/url] #
    Paul Watson Guest

  4. #4

    Default Re: PHP and returned values from Informix stored procedures

    You Sir, are a star. Thank you



    Paul Watson wrote:
    > Not particularly pretty, but this function retrieves the
    > values from the spl sp_mailsetup into $result, each elephant
    > of $result is then access via $result['[Expr_1]'] etc
    >
    > $result=ifx_query("execute procedure sp_mailsetup('$ID')",$conn);
    > if($result)
    > {
    > $row=ifx_fetch_row($result,'NEXT');
    > print $result['[Expr_1]'];
    > print $result['[Expr_2]'];
    > }
    >
    >
    Steve Weet Guest

  5. #5

    Default Re: PHP and returned values from Informix stored procedures

    Steve Weet wrote:
    > You Sir, are a star. Thank you
    He sir, are a disastar...
    > Paul Watson wrote:
    >
    >> Not particularly pretty, but this function retrieves the
    >> values from the spl sp_mailsetup into $result, each elephant
    >> of $result is then access via $result['[Expr_1]'] etc
    >>
    >> $result=ifx_query("execute procedure sp_mailsetup('$ID')",$conn);
    >> if($result)
    >> {
    >> $row=ifx_fetch_row($result,'NEXT');
    >> print $result['[Expr_1]'];
    >> print $result['[Expr_2]'];
    >> }
    >>
    >
    >>
    --
    Ciao,
    The Obnoxious One

    "Ogni uomo mi guarda come se fossi una testa di cazzo"
    Obnoxio The Clown Guest

Similar Threads

  1. dt_ Stored Procedures
    By chopper in forum ASP Database
    Replies: 2
    Last Post: July 20th, 04:06 PM
  2. New to ASP and Stored Procedures
    By John Berman in forum ASP Database
    Replies: 6
    Last Post: February 28th, 01:37 AM
  3. Stored Procedures and 4GL
    By Ahmer Sajjad in forum Informix
    Replies: 1
    Last Post: September 9th, 01:23 PM
  4. DDL values with DataReader and stored procedures
    By Rob Wire in forum ASP.NET General
    Replies: 5
    Last Post: August 14th, 09:50 AM
  5. Replies: 1
    Last Post: June 27th, 05:04 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139