How To Return Query Output in HTML Format?

Answer

By default, \"mysql\" returns query output in text table format. If you want to receive query output in HTML format, you need to use the \"-H\" command option. Here is a good tutorial exercise:

>cd mysqlbin
>mysql -u root -H test

mysql> SELECT * FROM links;
<TABLE BORDER=1><TR><TH>id</TH><TH>name</TH></TR>
<TR><TD>1</TD><TD>www.rnbold.com</TD></TR>
<TR><TD>10</TD><TD>www.rnbold.com</TD></TR></TABLE>
2 rows in set (0.00 sec)

All sql dba Questions

Ask your interview questions on sql-dba

Write Your comment or Questions if you want the answers on sql-dba from sql-dba Experts
Name* :
Email Id* :
Mob no* :
Question
Or
Comment* :
 





Disclimer: PCDS.CO.IN not responsible for any content, information, data or any feature of website. If you are using this website then its your own responsibility to understand the content of the website

--------- Tutorials ---