Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Can't display currency symbols in SQL Query reslts

Posted on 2008-10-22
5
Medium Priority
?
1,075 Views
Last Modified: 2013-12-13
Hello all, I'm having trouble displaying currency symbols in my MySQL querys when I display them in a table.

I've tried varying combinations of Type and Collation but to no avail.

Is there a simple fix or do I need to add the symbol via php on my web page?

Thanks in advance for your help.
0
Comment
Question by:betch
  • 3
  • 2
5 Comments
 
LVL 9

Expert Comment

by:Shahzad Fateh Ali
ID: 22774887
Hi,
Use html codes to store currency symbols.

0
 

Author Comment

by:betch
ID: 22774931
Just to confirm in the Price Field of my database I should type, for example:

&pound 9.99  to display £ 9.99

Thanks for the speed of your response.

0
 
LVL 9

Accepted Solution

by:
Shahzad Fateh Ali earned 1000 total points
ID: 22774947
It would be better if you use two columns, one for price (double) and other for sign (varchar).
and to display concate thm.
0
 

Author Comment

by:betch
ID: 22775060
Nice one shahzadfatehali.

The first method works great.

Thanks again Betch
0
 

Author Closing Comment

by:betch
ID: 31508672
Thanks a lot for your help.

Betch
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Foreword (July, 2015) Since I first wrote this article, years ago, a great many more people have begun using the internet.  They are coming online from every part of the globe, learning, reading, shopping and spending money at an ever-increasing ra…
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
Suggested Courses

927 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