2009年1月4日 星期日

如何將mysql table export 到xml file?

[Q] 如何將mysql table export 到xml file?

[try]
0. 在啟動 mysql client 需要enable --xml 選項
./mysql -ujon test --xml -e 'SELECT * FROM t1' > t1.xml

1. use php to fetch data and format the output



[ref]
http://dev.mysql.com/doc/refman/5.1/en/mysql-command-options.html#option_mysql_xml
http://forums.mysql.com/read.php?44,59164,161365#msg-161365

沒有留言: