Solved

Adding text to Output

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
MySQL Insert Combined IDs from 2 Unrelated tables 9 49
Mysqli Query 5 48
Closing database connection after prepared statement 1 44
update joined tables 2 31
This guide whil teach how to setup live replication (database mirroring) on 2 servers for backup or other purposes. In our example situation we have this network schema (see atachment). We need to replicate EVERY executed SQL query on server 1 to…
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 Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

895 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

14 Experts available now in Live!

Get 1:1 Help Now