Best unofficial Apache Server developers community |
|
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!
posted via StackOverflow
|
|
 
|
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. |
|
 
|
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. |