Best unofficial Apache Server developers community
Username
Forgot password?
Sign in with Twitter account
Sign in with Facebook account

MySQL tables to xml files: update files when tables are updated

1

38 views

I have a MySQL database and I need to turn its tables into xml files.

Using phpMyAdmin, I can do this conversion by exporting each table to xml format. But there's no use anyway, because I don't know how to update these xml files when the tables are updated/inserted with new information.

Can anyone give me a clue on how to proceed to achieve tables and xml files synchronized?

Thanks a lot!

asked June 10, 2011 4:53 am CDT
posted via StackOverflow

2 Answers

0
 

The operation of exporting a table into a XML file is a typical asyncronous process, I don't see any way to syncronize table variations (update/delete/insert) with the exported XML file.

You have only to re-export the table at every variation.

Or you can decide to schedule a re-export every hour, for example, minimizing the differences between the real table and the exported XML file.

answered June 10, 2011 5:25 am CDT
0
 

If the data set is not too big, you could just serve the xml file via a PHP script, that would fetch all the data and build up the XML file on the fly every time. Of course you can then cache the output for a few seconds/minutes depending on how fast your database changes.

answered June 10, 2011 5:25 am CDT

Your answer

Join with account you already have


Sign in with Twitter account
Sign in with Facebook account
Sign in with Google Friend Connect

Preview
Similar questions