reference/oci8/functions/oci-bind-by-name.xml
5e41012cfdf8f2eff5fa56de446c7656afac536c
...
...
@@ -11,14 +11,14 @@
11
11
<methodsynopsis>
12
12
<type>bool</type><methodname>oci_bind_by_name</methodname>
13
13
<methodparam><type>resource</type><parameter>statement</parameter></methodparam>
14
-
<methodparam><type>string</type><parameter>bv_name</parameter></methodparam>
15
-
<methodparam><type>mixed</type><parameter role="reference">variable</parameter></methodparam>
16
-
<methodparam choice="opt"><type>int</type><parameter>maxlength</parameter><initializer>-1</initializer></methodparam>
17
-
<methodparam choice="opt"><type>int</type><parameter>type</parameter><initializer>SQLT_CHR</initializer></methodparam>
14
+
<methodparam><type>string</type><parameter>param</parameter></methodparam>
15
+
<methodparam><type>mixed</type><parameter role="reference">var</parameter></methodparam>
16
+
<methodparam choice="opt"><type>int</type><parameter>max_length</parameter><initializer>-1</initializer></methodparam>
17
+
<methodparam choice="opt"><type>int</type><parameter>type</parameter><initializer>0</initializer></methodparam>
18
18
</methodsynopsis>
19
19
<para>
20
-
Binds a PHP variable <parameter>variable</parameter> to the Oracle
21
-
bind variable placeholder <parameter>bv_name</parameter>. Binding
20
+
Binds a PHP variable <parameter>var</parameter> to the Oracle
21
+
bind variable placeholder <parameter>param</parameter>. Binding
22
22
is important for Oracle database performance and also as a way to
23
23
avoid SQL Injection security issues.
24
24
</para>
...
...
@@ -49,14 +49,14 @@
49
49
</para>
50
50

51
51
<para>
52
-
You must specify <parameter>maxlength</parameter> when using
52
+
You must specify <parameter>max_length</parameter> when using
53
53
an <literal>OUT</literal> bind so that PHP allocates enough memory
54
54
to hold the returned value.
55
55
</para>
56
56

57
57
<para>
58
58
For <literal>IN</literal> binds it is recommended to set
59
-
the <parameter>maxlength</parameter> length if the statement is
59
+
the <parameter>max_length</parameter> length if the statement is
60
60
re-executed multiple times with different values for the PHP
61
61
variable. Otherwise Oracle may truncate data to the length of the
62
62
initial PHP variable value. If you don't know what the maximum
...
...
@@ -97,37 +97,37 @@
97
97
<term><parameter>statement</parameter></term>
98
98
<listitem>
99
99
<para>
100
-
A valid OCI8 statement identifer.
100
+
A valid OCI8 statement identifier.
101
101
</para>
102
102
</listitem>
103
103
</varlistentry>
104
104
<varlistentry>
105
-
<term><parameter>bv_name</parameter></term>
105
+
<term><parameter>param</parameter></term>
106
106
<listitem>
107
107
<para>
108
108
The colon-prefixed bind variable placeholder used in the
109
109
statement. The colon is optional
110
-
in <parameter>bv_name</parameter>. Oracle does not use question
110
+
in <parameter>param</parameter>. Oracle does not use question
111
111
marks for placeholders.
112
112
</para>
113
113
</listitem>
114
114
</varlistentry>
115
115
<varlistentry>
116
-
<term><parameter>variable</parameter></term>
116
+
<term><parameter>var</parameter></term>
117
117
<listitem>
118
118
<para>
119
-
The PHP variable to be associated with <parameter>bv_name</parameter>
119
+
The PHP variable to be associated with <parameter>param</parameter>
120
120
</para>
121
121
</listitem>
122
122
</varlistentry>
123
123
<varlistentry>
124
-
<term><parameter>maxlength</parameter></term>
124
+
<term><parameter>max_length</parameter></term>
125
125
<listitem>
126
126
<para>
127
127
Sets the maximum length for the data. If you set it to -1, this
128
128
function will use the current length
129
-
of <parameter>variable</parameter> to set the maximum
130
-
length. In this case the <parameter>variable</parameter> must
129
+
of <parameter>var</parameter> to set the maximum
130
+
length. In this case the <parameter>var</parameter> must
131
131
exist and contain data
132
132
when <function>oci_bind_by_name</function> is called.
133
133
</para>
...
...
@@ -224,7 +224,7 @@
224
224
<listitem>
225
225
<para>
226
226
<constant>SQLT_BOL</constant> or <constant>OCI_B_BOL</constant>
227
-
- for PL/SQL BOOLEANs (Requires OCI8 2.0.7 and Oracle Database 12c)
227
+
- for PL/SQL BOOLEANs (Requires Oracle Database 12c)
228
228
</para>
229
229
</listitem>
230
230
</itemizedlist>
...
...
@@ -314,7 +314,7 @@ oci_close($conn);
314
314

315
315
<para>
316
316
<example>
317
-
<title>Binding with a <function>foreach</function> loop</title>
317
+
<title>Binding with a <literal>foreach</literal> loop</title>
318
318
<programlisting role="php">
319
319
<![CDATA[
320
320
<?php
...
...
@@ -798,20 +798,11 @@ var_dump($output2); // false
798
798

799
799
</refsect1>
800
800

801
-
<refsect1 role="returnvalues">
802
-
&reftitle.returnvalues;
803
-
<para>
804
-
&return.success;
805
-
</para>
806
-
</refsect1>
807
-

808
801
<refsect1 role="notes">
809
802
&reftitle.notes;
810
803
<warning>
811
804
<para>
812
-
Do not use <link
813
-
linkend="ini.magic-quotes-gpc">magic_quotes_gpc</link> or
814
-
<function>addslashes</function>
805
+
Do not use <function>addslashes</function>
815
806
and <function>oci_bind_by_name</function> simultaneously as no
816
807
quoting is needed. Any magically applied quotes will be written
817
808
into your database because <function>oci_bind_by_name</function>
...
...
@@ -831,7 +822,7 @@ var_dump($output2); // false
831
822
</note>
832
823
<note>
833
824
<para>
834
-
The PHP <parameter>variable</parameter> argument is a reference. Some
825
+
The PHP <parameter>var</parameter> argument is a reference. Some
835
826
forms of loops do not work as expected:
836
827
</para>
837
828
<informalexample>
...
...
@@ -875,7 +866,6 @@ foreach ($myarray as $key => $value) {
875
866
</refsect1>
876
867

877
868
</refentry>
878
-

879
869
<!-- Keep this comment at the end of the file
880
870
Local variables:
881
871
mode: sgml
...
...
@@ -896,4 +886,3 @@ vim600: syn=xml fen fdm=syntax fdl=2 si
896
886
vim: et tw=78 syn=sgml
897
887
vi: ts=1 sw=1
898
888
-->
899
-

900
889