<?xml version="1.0"?>
<rss version="2.0">
  <channel>
    <title>PHPDeveloper.org</title>
    <link>http://www.phpdeveloper.org</link>
    <description>Up-to-the Minute PHP News, views and community</description>
    <language>en-us</language>
    <pubDate>Tue, 21 May 2013 10:35:02 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[EasyTech Blog: Executing PL/SQL code in Zend Framework]]></title>
      <guid>http://www.phpdeveloper.org/news/11308</guid>
      <link>http://www.phpdeveloper.org/news/11308</link>
      <description><![CDATA[<p>
On the EasyTech blog, there's a <a href="http://blog.easytech.com.ar/2008/10/21/executing-plsql-code-in-zend-framework/">recent post</a> for Zend Framework developers out there working with the Oracle database showing how to execute PL/SQL code from your Zend_Db queries.
</p>
<blockquote>
Calling PL/SQL code from PHP can be tricky sometimes, specially when the PL/SQL procedure has input and output parameters. In this posting I will show you how to call a procedure from the PHP using Zend Framework. I will assume you have some experience using Zend Framework, specially the Database module (Zend_db).
</blockquote>
<p>
He walks through the creation of a simple PL/SQL stored procedure and how to prepare your query to get results out of it (Zend_Db_Statement_Oracle and an execute call). There's a few stipulations you'll need to follow - named parameters, reserving space for the output and using references for output variables.
</p>]]></description>
      <pubDate>Wed, 29 Oct 2008 11:15:17 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Christopher Jones' Blog: Casting PL/SQL arrays as REF CURSORS for Ruby (and PHP)]]></title>
      <guid>http://www.phpdeveloper.org/news/6808</guid>
      <link>http://www.phpdeveloper.org/news/6808</link>
      <description><![CDATA[<p>
In a <a href="http://blogs.oracle.com/opal/2006/11/30#a87">new post</a>, <i>Christopher Jones</i> talks about some difficulty a friend of his was having with returning a connection type from Oracle back to a script. In his case, it was a Ruby script and, unfortunately, there's no direct support for it. So, <i>Christopher</i> jumped in to help out.
</p>
<blockquote>
<p>
PHP's oci8 extension oci_bind_array_by_name() can bind collections but there is no equivalent in ruby-oci8. 
</p>
<p>
Justin outlines a solution on his blog <a href="http://jasonvogel.blogspot.com/2006/11/invoking-plsql-package-routine-with.html">Ruby: Invoking a PL/SQL Package with Array args</a>. His example relies on some company infrastructure so I came up with this standalone example.  This first SQL*Plus script sets up the scenario.
</p> 
</blockquote>
<p>
Stick with me on this one - there's some PHP right there <a href="http://blogs.oracle.com/opal/2006/11/30#a87">at the end</a>. He shows how much simpler the same kind of operation would be in PHP thanks to the oci_bind_array_by_name functionality understanding the return value. What took about 20 lines for just the Ruby code to handle the result correctly takes only five in PHP.
</p>]]></description>
      <pubDate>Fri, 01 Dec 2006 10:41:00 -0600</pubDate>
    </item>
  </channel>
</rss>
