开发者

Whats the best way to generate a XML output of a MySQL database using PHP

开发者 https://www.devze.com 2022-12-30 13:33 出处:网络
A bit on my requirements, at the moment i\'m passing on a search string from a Cocoa app to a PHP script which queries the database, and then generates an开发者_如何学C XML output for Cocoa again.

A bit on my requirements, at the moment i'm passing on a search string from a Cocoa app to a PHP script which queries the database, and then generates an开发者_如何学C XML output for Cocoa again.

The only bit I am having issues with now is generating the XML output from the db query.

At the moment, i'm trying to loop through the results and output them, however I am having issues, I can create the XML file but it doesn't get the results from the loop.

I can post my code if needed, but I'm sure somebody will have a more effective method.


Do not use PHP at all for the XML generation. MySQL can do that. If the XML in a specific format you can use XSLT, but at that point it may be easier to use PHP instead.

0

精彩评论

暂无评论...
验证码 换一张
取 消