Thursday, 21 August 2014

Select row from one table and insert into another tables field as XML / JSON in one statement?



I am looking to select a row from one table, collecting the result as XML or JSON and inserting it into another tables field all in one statement without having to handle anything in PHP.


I wonder if I can harness the power of the CLI functionality where you can add a -X to when logging in to retrieve any data returned in XML format?



mysql -u mysql_user -p password -X


Thanks in advance,


Ash.


Additional -


Just to add, this one query not being run from the command line, I mean running it from PHP but not having to handle the data etc in PHP. Thanks again.


No comments:

Post a Comment