Solved

Adding text to Output

Posted on 2011-03-21
2
254 Views
Last Modified: 2012-05-11
Hello Folks,

I want to add some html tags around the results of a MYSQL query results...

before --
e.g SELECT price from products
returns 9.99

after --
e.g SELECT price from products
returns <font color=#fe020e><b>9.99</b>  


So i would have "<font color=#fe020e><b>" at the prefix of the results of the column and "</b>"  at the end..

Thanks in advance
0
Comment
Question by:greeneel
2 Comments
 
LVL 9

Accepted Solution

by:
AriMc earned 500 total points
ID: 35183503

Use the concat function:

SELECT concat('<font color=#fe020e><b>',price,'</b>') as mycolumn from products;
0
 
LVL 11

Author Comment

by:greeneel
ID: 35184565
Thanks alot..
0

Featured Post

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
understanding output of mysql version 2 60
SQL inner join confusion 15 52
[MYSQL]: Delete is very slow 4 68
Parts and Products table schema in mysql 6 51
Foreword In the years since this article was written, numerous hacking attacks have targeted password-protected web sites.  The storage of client passwords has become a subject of much discussion, some of it useful and some of it misguided.  Of cou…
Introduction Since I wrote the original article about Handling Date and Time in PHP and MySQL (http://www.experts-exchange.com/articles/201/Handling-Date-and-Time-in-PHP-and-MySQL.html) several years ago, it seemed like now was a good time to updat…
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

813 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now