FAQs

ID #1002

PHP Oracle Connections (oci)

Oracle Instant Client with oci are enabled at account set up.

To test your connection, you can use the PHP script below.

 

<?php
$conn = oci_connect('SchemaName', 'SchemaPassword', '//hostname/SID');
$query = 'select sysdate from dual';
$stid = oci_parse($conn, $query);
oci_execute($stid, OCI_DEFAULT);
while ($row = oci_fetch_array($stid, OCI_ASSOC)) {
foreach ($row as $item) {
echo $item." ";
}
echo "<br>\n";
}
oci_free_statement($stid);
oci_close($conn);
?>

 

Please note that pdo_oci is also enabled.

For pdo_oci example, please see FAQ:

http://faq.enciva.com/content/6/48/en/is-pdo_oci-available-for-oracle.html

 

If you have any questions, please raise a support ticket

Tags: -

Related entries:

Last update: 2013-02-07 23:07
Author: EncivaFAQ
Revision: 1.1

{writeDiggMsgTag} {writeFacebookMsgTag} {writePrintMsgTag} {writeSend2FriendMsgTag} {writePDFTag}
{translationForm}
Rate this FAQ

Average rating: 0 (0 Votes)

completely useless 1 2 3 4 5 most valuable

You cannot comment on this entry

5 users online | 5 Guests and 0 Registered

powered by phpMyFAQ 2.7.1 |