Jump to content

£ sign no display! Please Help!


kieron84

Recommended Posts

Hi all, firstly I am sorry if this has been asked before, I have had a look around google for the correct answer and I am still confused, so I am hoping a patient person can help.

 

I have not long started out in web design and went straight into building a company website for my work. All seems to be going well and I roughly what I set out to do apart from the following;

 

I have created a 'job page' on the site and I have linked to a 'details-page' showing more information about the vacancy.

On that page I have a section for 'Pay Rates' and I can not seem to get the 'echo' string to show the £ sign.

 

Now my database is UTF-8 aswell as my website and the vacancies table is also UTF-8, but still no luck.

 

I need to be able to show the £ sign as well as other signs.

 

Am I missing something or doing something incorrectly?

 

PLEASE NOTE: I am using XAMPP as a testing server and I am not that great at writing PHP code!! 

 

  Table structure for table vacancies

Column Type Null Default
id int(11) No
reference varchar(50) Yes NULL
title varchar(200) Yes NULL
location varchar(200) Yes NULL
employmentType varchar(200) Yes NULL
licenceType varchar(200) Yes NULL
description longtext Yes NULL
other longtext Yes NULL
payeRates text Yes NULL
ltdRates varchar(100) Yes NULL
 
Link to comment
Share on other sites

Use your datatypes the correct way.  Prices shouldn't be stored as a string, it will bite you in the ass in the future because you won't be able to order your queries correctly, much less query them correctly.  What happens when you want to search a range of prices?  You can't use the greater than less than symbols for strings, as far as I know.

 

Anyway, the £ symbol has no purpose in a price column.  You can add that when you pull it out of the database.

SELECT CONCAT('£', payRates) as payRates FROM yourTable

 

Save yourself the frustration and use your datatypes.  It's so worth it!

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.