Snippet Name: Get HTML and XML output from queries.
Description: The output of this is code that can be cut-and-pasted into your HTML editor of choice. Complex queries not easily put into a single -e string can be done like this:
mysql -H < myqueries.sql
Note that no HTML is generated for any query that does not have a result set (like INSERT or UPDATE).
Change the -H to a -X to get XML output.
Comment: (none)
Language: MYSQL
Highlight Mode: MYSQL
Last Modified: March 01st, 2009
|
mysql -H -e "SELECT * FROM mytable WHERE somecondition='somevalue'" |