Generate html with the mysql client
I’m a big fan of the MySQL command line tool ie the default text client modestly named: mysql. I use it everyday because you can do almost everything with it (DML, DDL, DCL, administrative tasks,…).
It has many options including generate xml or html output.
$ mysql --help | grep "\--html" -H, --html Produce HTML output.
So you can easily script it and generate an HTML document:
$ mysql -e"SELECT now() as DATE;" --html <TABLE BORDER=1><TR><TH>DATE</TH></TR><TR><TD>2013-09-11 19:25:41</TD></TR></TABLE>
It’s very simple and it’s valid HTML but it is not valid XHTML!
Why, in 2013, a tool generates HTML rather than XHTML ?
Cloud Solutions Architect at Oracle
MySQL Geek, author, blogger and speaker
I’m an insatiable hunger of learning.
—–
Blog: www.dasini.net/blog/en/
Twitter: https://twitter.com/freshdaz
SlideShare: www.slideshare.net/freshdaz
Youtube: https://www.youtube.com/channel/UC12TulyJsJZHoCmby3Nm3WQ
—–
I have a question : Is your site generated with mysql -html ?