Solved

Adding text to Output

Posted on 2011-03-21
2
258 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:Eaddy Barnes
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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:Eaddy Barnes
ID: 35184565
Thanks alot..
0

Featured Post

Do you have a plan for Continuity?

It's inevitable. People leave organizations creating a gap in your service. That's where Percona comes in.

See how Pepper.com relies on Percona to:
-Manage their database
-Guarantee data safety and protection
-Provide database expertise that is available for any situation

Question has a verified solution.

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

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…
Popularity Can Be Measured Sometimes we deal with questions of popularity, and we need a way to collect opinions from our clients.  This article shows a simple teaching example of how we might elect a favorite color by letting our clients vote for …
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

627 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