Export XML with only one MySQL request ?

Posted by mere-teresa on Stack Overflow See other posts from Stack Overflow or by mere-teresa
Published on 2010-05-25T08:41:45Z Indexed on 2010/05/25 9:11 UTC
Read the original article Hit count: 158

Filed under:
|
|

I want to export in XML format some data from 7 tables (MySQL database), and then I want to import in another database. And I have a update or insert rule for data.

I already have a SQL query retrieving all data, with JOINs on my 7 tables. But...when I try to put data in XML format, I reach a limit. My PHP loop can catch each row, but I would like to benefit from hierachical structure of the XML, and all I have are rows with the same data repeated.

It is better to query once and to construct the XML tree in PHP or to query each time I want access to a lower level ?

© Stack Overflow or respective owner

Related posts about php

Related posts about mysql