Thank you for visiting this site. If you are looking for web hosting
services, you have come to the right place. Please search my database of
over 2400
hosting companies.
If you need any help, please email me at terence @ hostpulse.com . I
will personally try to reply your email within a day and give you some basic
guidelines, negotiate with a few hosts to offer you good pricing or
answer any hosting related problems that you may have.
ocibindbyname --
Bind a PHP variable to an Oracle Placeholder
Description
bool ocibindbyname ( resource stmt, string ph_name, mixed &variable [, int maxlength [, int type]])
ocibindbyname() binds the PHP variable
variable to the Oracle placeholder
ph_name. Whether it will be used for
input or output will be determined run-time, and the necessary
storage space will be allocated. The
length parameter sets the maximum length
for the bind. If you set length to -1
ocibindbyname() will use the current length of
variable to set the maximum length.
If you need to bind an abstract Datatype (LOB/ROWID/BFILE) you
need to allocate it first using
ocinewdescriptor() function. The
length is not used for abstract Datatypes
and should be set to -1. The type variable
tells oracle, what kind of descriptor we want to use. Possible
values are: OCI_B_FILE (Binary-File), OCI_B_CFILE
(Character-File), OCI_B_CLOB (Character-LOB), OCI_B_BLOB
(Binary-LOB) and OCI_B_ROWID (ROWID).
Example 1. ocibindbyname() example
<?php /* OCIBindByPos example thies at thieso dot net (980221) inserts 3 records into emp, and uses the ROWID for updating the records just after the insert. */
$conn = OCILogon("scott", "tiger");
$stmt = OCIParse($conn, "insert into emp (empno, ename) " . "values (:empno,:ename) " . "returning ROWID into :rid");
$stmt = OCIParse($conn, "select * from emp where empno in (1111,2222,3333)"); OCIExecute($stmt); while (OCIFetchInto($stmt, &$arr, OCI_ASSOC)) { var_dump($arr); } OCIFreeStatement($stmt);
/* delete our "junk" from the emp table.... */ $stmt = OCIParse($conn, "delete from emp where empno in (1111,2222,3333)"); OCIExecute($stmt); OCIFreeStatement($stmt);
OCILogoff($conn); ?>
Note:
This function was renamed to oci_bind_by_name()
after PHP >= 5.0.0. For downward compatibility
ocibindbyname() can also be used.
This is deprecated, however.
Warning
It is a bad idea to use magic quotes and
ocibindbyname() simultaneously as no quoting
is needed on quoted variables and any quotes magically applied
will be written into your database as
ocibindbyname() is not able to distinguish
magically added quotings from those added by intention.
Web Hosting Showcase
View the web hosting
showcase to find more relevant web hosting choice that will guide you in
selecting a good web hosting company.
This site provide
free reviews of web hosting services from 100 selected companies. There
are over 3000 over website hosting companies on the internet. Please
research these domain hosting services carefully before you sign up with
any. Read articles on web page hosting, web site hosting, domain names,
website speed test, cheap web hosting services, PHP scripts, mysql
database, asp hosting and virtual private server to gain a better
knowledge on domain hosting and cheap web hosting.