Category: >> mySQL >> Get HTML/XML output from queries. Bookmark and Share

<< lastnext >>

Snippet Name: Get HTML/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)

Author: CoderZone
Language: MYSQL
Highlight Mode: MYSQL
Last Modified: March 01st, 2009

mysql -H -e "SELECT * FROM mytable WHERE somecondition='somevalue'"
There haven't been any comments added for this snippet yet. You may add one if you like.  Add a comment 
© | users online: 7