Title: Oracle Connect
Last modified: August 22, 2016

---

# Oracle Connect

 *  [DampfHans12345](https://wordpress.org/support/users/dampfhans12345/)
 * (@dampfhans12345)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/oracle-connect/)
 * Hi,
 * is there a way to use a Oracle DB instead of MySQL?
 * I found old Topics discussing this, but WordPress improves and I’m wondering 
   if this is now possible.
 * I found this code in an older topic, but I don’t know where to use it:
 *     ```
       function MyOracleConnection ()
   
       {
   
       $conn = oci_connect('hr', 'tester', 'localhost/XE');
   
       if (!$conn) {
   
           $e = oci_error();
   
           trigger_error(htmlentities($e['message'], ENT_QUOTES), E_USER_ERROR);
   
                }
   
                else     {
   
                echo '<p>Congrats: Oracle meets WordPress!</p>';
   
       }
   
       // Prepare the statement
   
       $stid = oci_parse($conn, 'SELECT * FROM departments');
   
       if (!$stid) {
   
           $e = oci_error($conn);
   
           trigger_error(htmlentities($e['message'], ENT_QUOTES), E_USER_ERROR);
   
       }
   
       // Perform the logic of the query
   
       $r = oci_execute($stid);
   
       if (!$r) {
   
           $e = oci_error($stid);
   
           trigger_error(htmlentities($e['message'], ENT_QUOTES), E_USER_ERROR);
   
       }
   
       // Fetch the results of the query
   
       print "<table border='1'>\n";
   
       while ($row = oci_fetch_array($stid, OCI_ASSOC+OCI_RETURN_NULLS)) {
   
           print "<tr>\n";
   
           foreach ($row as $item) {
   
              print "    <td>" . ($item !== null ? htmlentities($item, ENT_QUOTES) : " ") . "</td>\n";
   
           }
   
           print "</tr>\n";
   
       }
   
       print "</table>\n";
   
       oci_free_statement($stid);
   
       oci_close($conn);
   
       }
       ```
   

Viewing 1 replies (of 1 total)

 *  Moderator [Jan Dembowski](https://wordpress.org/support/users/jdembowski/)
 * (@jdembowski)
 * Forum Moderator and Brute Squad
 * [11 years, 4 months ago](https://wordpress.org/support/topic/oracle-connect/#post-5544039)
 * > is there a way to use a Oracle DB instead of MySQL?
 * Nope.

Viewing 1 replies (of 1 total)

The topic ‘Oracle Connect’ is closed to new replies.

## Tags

 * [database](https://wordpress.org/support/topic-tag/database/)
 * [oracle](https://wordpress.org/support/topic-tag/oracle/)

 * In: [Installing WordPress](https://wordpress.org/support/forum/installation/)
 * 1 reply
 * 2 participants
 * Last reply from: [Jan Dembowski](https://wordpress.org/support/users/jdembowski/)
 * Last activity: [11 years, 4 months ago](https://wordpress.org/support/topic/oracle-connect/#post-5544039)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
