Forum : How To Return Query Output in HTML Format?
Brief description  about Online courses   join in Online courses
View Abhijit  Paul 's Profile

How To Return Query Output in HTML Format?

Hi sir,

Please explain me how to return query output in HTML Format?
Asked by Abhijit Paul | Nov 23, 2009 |  Reply now
Replies (1)
View teacher siliconindia 's Profile
Hi abhijit,

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.GlobalGuideLine.com</TD></TR>
<TR><TD>10</TD><TD>www.GlobalGuideLine.com</TD></TR></TABLE>
Nov 23, 2009