kieron84 Posted May 7, 2015 Share Posted May 7, 2015 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 Quote Link to comment Share on other sites More sharing options...
requinix Posted May 7, 2015 Share Posted May 7, 2015 What's the code? Did you put the £ right in the code? Was the file saved using UTF-8 encoding? Quote Link to comment Share on other sites More sharing options...
Zane Posted May 7, 2015 Share Posted May 7, 2015 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! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.