<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: oci_bind_by_name maxlength is not so optional</title>
	<atom:link href="http://livebookmark.net/journal/2008/05/06/oci_bind_by_name-maxlength-is-not-so-optional/feed/" rel="self" type="application/rss+xml" />
	<link>http://livebookmark.net/journal/2008/05/06/oci_bind_by_name-maxlength-is-not-so-optional/</link>
	<description>web, money and etc.</description>
	<pubDate>Sun, 06 Jul 2008 05:52:38 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
		<item>
		<title>By: Harun Yayli</title>
		<link>http://livebookmark.net/journal/2008/05/06/oci_bind_by_name-maxlength-is-not-so-optional/#comment-5929</link>
		<dc:creator>Harun Yayli</dc:creator>
		<pubDate>Wed, 07 May 2008 17:36:23 +0000</pubDate>
		<guid isPermaLink="false">http://livebookmark.net/journal/?p=168#comment-5929</guid>
		<description>@cj
thanks for the explanation. It makes sense to me what you're explaining. The example shown at the php.net's documentation, has the similar approach that I have. It explicitly sets the size of the field. However the documentation says, on top, the length is optional.
This makes you think that dynamically oci will grab the size of the field by default and throw an error based on the table definition in oracle when oci_execute is called .

PS: I've corrected the example.</description>
		<content:encoded><![CDATA[<p>@cj<br />
thanks for the explanation. It makes sense to me what you&#8217;re explaining. The example shown at the php.net&#8217;s documentation, has the similar approach that I have. It explicitly sets the size of the field. However the documentation says, on top, the length is optional.<br />
This makes you think that dynamically oci will grab the size of the field by default and throw an error based on the table definition in oracle when oci_execute is called .</p>
<p>PS: I&#8217;ve corrected the example.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: cj</title>
		<link>http://livebookmark.net/journal/2008/05/06/oci_bind_by_name-maxlength-is-not-so-optional/#comment-5926</link>
		<dc:creator>cj</dc:creator>
		<pubDate>Wed, 07 May 2008 06:16:11 +0000</pubDate>
		<guid isPermaLink="false">http://livebookmark.net/journal/?p=168#comment-5926</guid>
		<description>It makes senses that a length would be required because when the oci_bind_by_name() call is made, there is no data in $$key (a.k.a. $a, $b or $c). Without a length passed, PHP tells the DB to expect a single byte string.

For string binds where the length is not known when binding, use a length that is longer than the longest possible string.  If you don't know what this is in advance, then re-call oci_bind_by_name() with the actual size prior to each oci_execute() call.

The cardinal rule for binding is that the memory address used in the bind call must continue to exist and be usable when the oci_execute occurs.

The oci_commit() in your example is not needed because oci_execute() commits by default. For best performance and transaction control, use oci_execute($stmt, OCI_DEFAULT).</description>
		<content:encoded><![CDATA[<p>It makes senses that a length would be required because when the oci_bind_by_name() call is made, there is no data in $$key (a.k.a. $a, $b or $c). Without a length passed, PHP tells the DB to expect a single byte string.</p>
<p>For string binds where the length is not known when binding, use a length that is longer than the longest possible string.  If you don&#8217;t know what this is in advance, then re-call oci_bind_by_name() with the actual size prior to each oci_execute() call.</p>
<p>The cardinal rule for binding is that the memory address used in the bind call must continue to exist and be usable when the oci_execute occurs.</p>
<p>The oci_commit() in your example is not needed because oci_execute() commits by default. For best performance and transaction control, use oci_execute($stmt, OCI_DEFAULT).</p>
]]></content:encoded>
	</item>
</channel>
</rss>
