From MySQL to PostgreSQL

wxdqz

New Member
I have a situation like this,

I have a MySQL database where I need to migrate it to PostgreSQL. I wrote a script to automate this process,

My script works like this:

1. Open connection in MySQL
2. Read all the data in database "X"
3. Open connection in PostgreSQL (database "X" already been created)
4. While($getrow=mysql_fetch_array($check))
- assign data to variable
- insert data into PostgreSQL (using pg_exec)

I would like to ask if it is possible to connect to different database engine like the above situation ? I asked because I have an error while trying to run the script. It says "The Document contains no data...." I wonder what has caused this ? Some guidance will be much appreciate!

TIA
 
Back
Top