Home » Open Source » MySQL » convert data from MySQL table to Oracle table by php (Mysql5, oracle8i, win2003 server)
convert data from MySQL table to Oracle table by php [message #450281] Tue, 06 April 2010 03:51 Go to next message
ahoussam
Messages: 5
Registered: March 2010
Junior Member
hello
I want to convert a set of data (array) obtained from a table in a MySQL database by SELECT instruction to insert it into table in Oracle Database by use php script
how can i resolve it?
by example please!
thanks
Re: convert data from MySQL table to Oracle table by php [message #450285 is a reply to message #450281] Tue, 06 April 2010 04:09 Go to previous messageGo to next message
Michel Cadot
Messages: 68624
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
What is EXACTLY your problem?
You don't know PHP?
You don't know how to use INSERT in PHP?
You don't know how to connect to Oracle?
...

Regards
Michel
Re: convert data from MySQL table to Oracle table by php [message #450301 is a reply to message #450285] Tue, 06 April 2010 05:19 Go to previous messageGo to next message
ahoussam
Messages: 5
Registered: March 2010
Junior Member
hi Michel,
Thank you for your attention

I get data from mysql such as:

$aAllUsersHolidays = array();
$aAllUsersHolidays = KTHoliday::getAllUsersHoliday($userSubSection);
echo "<table border='1'>\n";
foreach($aAllUsersHolidays as $val_line){
echo "<tr>\n";
foreach($val_line as $value){
echo "<td>" . ($value !== null ? htmlentities($value, ENT_QUOTES) : "&nbsp;") . "</td>\n";
}
echo "<tr>\n";
}
echo "</table>\n";

now I need to insert same data into oracle table such as:
$conn = oci_connect('pers', 'pers', IP/orcl', 'charset');
$query = 'INSERT INTO student (userID, userName, userEmail) values ( ...???)';
how I use this command with my data?
thank you
Re: convert data from MySQL table to Oracle table by php [message #450304 is a reply to message #450301] Tue, 06 April 2010 05:29 Go to previous messageGo to next message
Michel Cadot
Messages: 68624
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
http://php.net/manual/en/book.oci8.php

start with oci_parse.


Regards
Michel
Tell me and I'll forget; show me and I may remember; involve me and I'll understand
Re: convert data from MySQL table to Oracle table by php [message #450309 is a reply to message #450304] Tue, 06 April 2010 05:50 Go to previous message
ahoussam
Messages: 5
Registered: March 2010
Junior Member
Thanks!
I have read this site before I send you this participation, but did not find an answer to my question
I want to describe how I write this command with foreach!
there are so many examples but for one variable and not a matrix of data!
Previous Topic: How get data from Mysql to Oracle table , by create oracle form
Next Topic: mysql to oracle
Goto Forum:
  


Current Time: Thu Mar 28 05:53:17 CDT 2024