This topic is locked

Two different DataBases (Oracle and MySQL)

10/8/2007 12:38:56 PM
PHPRunner General questions
G
gbhmayer author

I have two databases (oracle and MySQL) and need update a table (MySQL) with data from the oracle. Can i to do this with PHPRunner application?

Alexey admin 10/9/2007

Hi,
PHPRunner works with single database only.

However you can add a code into Event to connect another database and update data there.
You can describe your task a bit more and I'll tell you how this can be done with PHPRunner.

hfg 10/10/2007

Sorry to jump in on someone else's posting, but this really peaked my interest. I have what maybe a similar situation and would be interested in the possibility of moving data from a MySQL DB on one server to a Oracle on another.
On the MySQL we have a table called Customer with the following needed fields
FName

LName

Address

City

State

Zip

Phone

Other_Phone
I would like to be able to copy these to the Oracle DB on a different server (192.168.1.5) on a DB called Deal and a table called App. The need fields are as follows (there are other none required or used fields):
App_First_Name

App_Last_Name

App_Address1

App_City

App_State

App_Zip

App_Phone1

App_Phone2
There is also a field I want to put dummy info in as it is required in the App table but I don't have anything in the MySQL DB for it. That is the APP_SSN field. I would put 999-99-9999 in it.
If this can be made to work it would be great.
Thanks

Alexey admin 10/11/2007

Hi,
here is the sample code to insert data into Oracle database.

$oraconn=oci_connect("username","password","db");

$sql = insert into TableName (Field1,Field2) values (....)";

$stmt=oci_parse($oraconn,$sql);

oci_execute($stmt);

oci_close($oraconn);

hfg 10/11/2007

As long as we are on the topic what would be the code to go the other direction. An PHPRunner project based on Oracle going to a MySQL DB?
Thanks for the help

Alexey admin 10/15/2007

Hi,
there is nothing PHPRunner-specific here.

Just use any MySQL connection script sample.
Here are some useful links.

http://www.webcheatsheet.com/php/connect_mysql_database.php

http://www.w3schools.com/php/php_mysql_connect.asp