Re: XML/MySQL

From: Date: Sun, 26 Oct 2003 22:27:22 +0000
Subject: Re: XML/MySQL
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-167653@lists.php.net to get a copy of this message
Hello, On 10/26/2003 06:08 PM, Ian Williams wrote:
I want to write a function that will take any SQL query as a parameter, and generate XML that represents the recordset. e.g. "SELECT * FROM Customers" returns: <recordset>
    <record id="1" name="Mr Smith" purchases="2"/>
    <record id="2" name="Mr Jones" purchases="25"/>
    <record id="3" name="Mr Davis" purchases="7"/>
</recordset> There are two approaches I think. One is to use the XML DOM, the other is simply to join lots of strings together. What is the best approach?
Thank is a common problem with solutions from several people. You may find some here: http://www.phpclasses.org/search.html?words=xml+mysql&restrict=C&go_search=1 -- Regards, Manuel Lemos Free ready to use OOP components written in PHP http://www.phpclasses.org/

« previous php.general (#167653) next »