faqts : Computers : Databases : MySQL : Tips and Tricks

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

9 of 11 people (82%) answered Yes
Recently 8 of 10 people (80%) answered Yes

Entry

How do you convert table output to XML or HTML?

Jun 19th, 2004 06:17
Mike Chirico, http://osdn.dl.sourceforge.net/sourceforge/souptonuts/README_mysql.txt


Try the following from the Unix/Linux command prompt:

$ mysql -X -e "select * from exams" test

The line above will select all records from exams in the test database,
with output in XML format.

To get HTML format, changed the -X above to -H.

Hope it helps.