INGRES_FETCH_PROC_RETURN(3) 1 INGRES_FETCH_PROC_RETURN(3)ingres_fetch_proc_return - Get the return value from a procedure callSYNOPSIS
int ingres_fetch_proc_return (resource $result)
DESCRIPTION
This function is used to retrieve the return value following the execution of an Ingres database procedure (stored procedure).
Note
If used with a row-producing procedure, this function should be called after all the rows from the procedure have been fetched
using ingres_fetch_array(3), ingres_fetch_object(3) or ingres_fetch_row(3). This function will eliminate any rows yet to be fetched
should there be any left over.
PARAMETERS
o $result
- The result identifier for a query
RETURN VALUES
Returns an integer if there is a return value otherwise it will return NULL.
EXAMPLES
Example #1
Get the return value from a procedure call
<?php
$link = ingres_connect($database);
if ( ingres_errno() != 0 ) {
$error_text = ingres_error();
die($error_text);
}
$result = ingres_query($link, "execute procedure php_proc (value = 1000)");
if ( ingres_errno() != 0 ) {
$error_text = ingres_error();
die($error_text);
}
echo "return value - " . ingres_fetch_proc_return($result) . "
";
ingres_close($link);
?>
SEE ALSO ingres_query(3), ingres_fetch_array(3), ingres_fetch_object(3), ingres_fetch_row(3).
PHP Documentation Group INGRES_FETCH_PROC_RETURN(3)
Check Out this Related Man Page
INGRES_FETCH_OBJECT(3) 1 INGRES_FETCH_OBJECT(3)ingres_fetch_object - Fetch a row of result into an objectSYNOPSIS
object ingres_fetch_object (resource $result, [int $result_type])
DESCRIPTION
This function is similar to ingres_fetch_array(3), with one difference - an object is returned instead of an array. Indirectly, this means
that you can access the data only by the field names and not by their offsets (numbers are illegal property names).
With regard to speed, the function is identical to ingres_fetch_array(3), and almost as quick as ingres_fetch_row(3) (the difference is
insignificant).
Note
Related Configurations
See also the ingres.fetch_buffer_size and ingres.utf8 directives in Runtime Configuration.
PARAMETERS
o $link
- The query result identifier
o $result_type
- (Optional argument.) $result_type is a constant and can take the following values: INGRES_ASSOC, INGRES_NUM, and INGRES_BOTH.
RETURN VALUES
Returns an object that corresponds to the fetched row, or FALSE if there are no more rows
EXAMPLES
Example #1
Fetch a row into an object
<?php
$link = ingres_connect($database, $user, $password);
$result = ingres_query($link, "select * from table");
while ($row = ingres_fetch_object($result)) {
echo $row->user_id;
echo $row->fullname;
}
?>
SEE ALSO ingres_query(3), ingres_num_fields(3), ingres_field_name(3), ingres_fetch_array(3), ingres_fetch_assoc(3), ingres_fetch_row(3).
PHP Documentation Group INGRES_FETCH_OBJECT(3)
I have a file which loads procedure/function into ORACLE.Top of the file contains 3 rows which is FILENAME, FILETYPE AND COMMENTS and then the function/procedure etc.
FILENAME:
FILETYPE:
COMMENTS:
<Function/Procedure etc>
The Filename,FILETYPE, COMMENTS will be entered by the dba which... (10 Replies)
I wrote a unix scrip which calls sql script.
the problem is the query runs well in toad but doesnt work in unix script.
anyone could help?
query as follows:
select sum(case when error_text like 'SystemError:Operation Time Out (Server Side)%' then 1 else 0 END) as count
from a
... (39 Replies)
Hi ,
I have a dellimited .dat file and a sqlloader.
I want to call the sqlloader from a oracle stored procedure.
The procedure should return the result of sqlloader's execution. (3 Replies)
Hi,
I have a stored procedure which takes in arguments from my script and deletes rows from a table.
Before calling the procedure from the script i want to make sure if the procedure actually exists.If it exists, i want to pass values to the procedure and execute it.if the stored procedure... (3 Replies)
Hi,
Can anyone please let me know where to check if a particular stored procedure exists.
If the procedure exists I want to display some message and if the procedure does not exists i want to exit with error message.
checking from dba_objects doesnt help. suprisingly the procedure i... (3 Replies)
Hi,
My stored procedure returns a value.
How to retrieve the value and display in unix.
Stored procedure
CREATE OR REPLACE
PROCEDURE gohan(num INT) IS
BEGIN
DBMS_OUTPUT.PUT_LINE('My lucky number is ' || num);
END;
Unix Scripting i used
sqlplus -s... (7 Replies)
Hi
i am calling a stored procedure from unix shell like this call
test_proc('0002','20100218');
the stored procedure was giving output
like this dbms_output.put_line(' processed earlier');
i want to see the output in the unix shell where i called.
Thanks
barani (6 Replies)
Hi
i want to call a oracle stored procedure from unix (using bash shell).
consider this is my oracle stored procedure with parameter
create procedure testproc(name IN varchar, age IN Number, id OUT Number )
AS
begin
id=1;
dbms_output.put.line('successfull validation')
end;... (6 Replies)
HI,
i want to write a script (Linux) that:
1) connect to a database oracle
2) execute some store procedure.
Can anybody help me, please?
Thanks a lot
Andrew (3 Replies)
Hi,
I have a sybase stored procedure which takes two input parameters (start_date and end_date) and when it get executed, it gives few records as an output.
I want to write a unix script (ksh) which login to the sybase database, then execute this stored procedure (takes the input parameter as... (8 Replies)
Hi,
I want to create MySQL stored procedure and call the stored procedure using perl.
I tried like this:
use DBI;
my $dbh = DBI->connect ("DBI:mysql:test",
"root", "ibab",
{ RaiseError => 1, PrintError => 0});
$create_procedure =... (5 Replies)