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/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to