Solved

Adding text to Output

Posted on 2011-03-21
2
252 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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Fore-Foreword Today (2016) Maxmind has a new approach to the distribution of its data sets.  This article may be obsolete.  Instead of using the examples here, have a look at the MaxMind API (https://www.maxmind.com/en/geolite2-developer-package). …
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

744 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

12 Experts available now in Live!

Get 1:1 Help Now