?
Solved

Adding text to Output

Posted on 2011-03-21
2
Medium Priority
?
260 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 2000 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

Moving data to the cloud? Find out if you’re ready

Before moving to the cloud, it is important to carefully define your db needs, plan for the migration & understand prod. environment. This wp explains how to define what you need from a cloud provider, plan for the migration & what putting a cloud solution into practice entails.

Question has a verified solution.

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

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…
This post contains step-by-step instructions for setting up alerting in Percona Monitoring and Management (PMM) using Grafana.
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

719 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