Re: XML/MySQL

From: Date: Mon, 27 Oct 2003 08:14:07 +0000
Subject: Re: XML/MySQL
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-167687@lists.php.net to get a copy of this message
Thanks to everyone who has responded. I have a lot of useful suggestions, and a warm feeling about this newsgroup ;-). I hope I can be of help to everyone in the future. cheers ian "Ian Williams" <ian@fetcheveryone.com> wrote in message news:20031026200941.63477.qmail@pb1.pair.com... > Apologies to anyone also subscribed to php.xml.dev, who will have read this > earlier, but it doesn't seem as frequently read as this news group... so I > am reposting... > > > Hi > 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? > > Thanks (and this is my first post to a newsgroup, and my first post to this > one, so excuse me if I've missed something vital!) > > cheers > ian ;-)

« previous php.general (#167687) next »