#3163: DboOracle should support stored procedures
-----------------------------------------------------------------+----------
Reporter: daniel.asanome |
Owner: phishy
Type: Enhancement |
Status: new
Priority: Medium |
Milestone: 1.2.x.x
Component: Oracle |
Version: RC1
Severity: Normal |
Resolution:
Keywords: oracle stored procedure sp daniel.asanome phishy |
Php_version: PHP 5
Cake_version: |
-----------------------------------------------------------------+----------
Comment (by emnu):
Hi all[[BR]]
[[BR]]
i made some additional function for DboOracle to run stored procedure. it
is totally different from daniel.asanome approach.[[BR]]
[[BR]]
here is an example.[[BR]]
[[BR]]
to call stored procedure
{{{
$result = $this->ModelName->query("BEGIN
STORED_PROCEDURE_NAME('$variable_name', :xout_100_bind_variable,
:xcur_cursor_name); END;");
}}}
'''explanation'''[[BR]]
* to set bind variable for output - have to begin with 'xout_' followed
by size and '_' and variable name.[[BR]]
* to set cursor - have to begin with 'xcur_' followed by variable
name.[[BR]]
result will return in this form
{{{
[0] => Array
(
[StoredProcedureName] => Array
(
[field1] => xxxx
[field2] => 1111
[field3] => 8i8u88u
)
)
[1] => Array
(
[StoredProcedureName] => Array
(
[field1] => xxxx
[field2] => 1111
[field3] => 8i8u88u
)
)
}}}
'''disadvantage'''[[BR]]
[[BR]]
* since i'm didn't bother about output variable, i didn't combine it with
the $result(i don't how to do it actually :( ).[[BR]]
* some other that i overlook.[[BR]][[BR]]
if anyone have an idea or comment on how to improve it, i would love to
hear that.
--
Ticket URL: <https://trac.cakephp.org/ticket/3163#comment:6>
CakePHP : The Rapid Development Framework for PHP <https://trac.cakephp.org/>
Cake is a rapid development framework for PHP which uses commonly known design
patterns like ActiveRecord, Association Data Mapping, Front Controller and MVC.
Our primary goal is to provide a structured framework that enables PHP users at
all levels to rapidly develop robust web applications, without any loss to
flexibility.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"tickets cakephp" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/tickets-cakephp?hl=en
-~----------~----~----~----~------~----~------~--~---