Re: Retrieving a MySQL recordset as XML
| From: | Kevin Waterson | Date: | Sun, 26 Oct 2003 21:17:28 +0000 |
| Subject: | Re: Retrieving a MySQL recordset as XML | ||
| References: | 1 | Groups: | php.xml.dev |
| Request: | Send a blank email to php-xml-dev+get-230@lists.php.net to get a copy of this message | ||
This one time, at band camp, "Ian Williams" <ian@fetcheveryone.com> wrote:
> Hello
> 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 ;-)
>
> --
> PHP XML Development Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
--
______
(_____ \
_____) ) ____ ____ ____ ____
| ____/ / _ ) / _ | / ___) / _ )
| | ( (/ / ( ( | |( (___ ( (/ /
|_| \____) \_||_| \____) \____)
Kevin Waterson
Port Macquarie, Australia