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.
If you are lucky enough to be using mysql ver 4.x+ -- it has this
functionality built-in, using the --xml command line option.
Sample run :
$ mysql -u usern
>
>
>
>
>
>
> 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?
What i have done in the past is use the dbx extension in php to do my
queries. Then i have iterated over the multi-dimens
If I were you I'd just join strings- it's much less resource intensive. Just
make sure you're using valid XML.
On Sunday 26 October 2003 12:08 pm, Ian Williams wrote:
> Apologies to anyone also subscribed to php.xml.dev, who will have read this
> earlier, but it doesn't seem as frequently read a
Hi,
As Ray has also mentioned sprintf() is the best approach. I would also
like to point out that you would be doing three iteration over your data
so please make sure that your queries are not just 'select * from
customers' but 'select * from customers where something=something'
all the best
4 matches
Mail list logo