Make sure the price looks like $110,000 and not $110000
I have to display like $110,000 and not like $110000. How to design the table field.If take price field as int then it will not take value 110,000 and if I take it as varchar then it will take as 110,000 but then how i will perform the mathematical function like 110,000*2 or 110,000+500.
(In other words, store it as an INT or possibly DECIMAL in the DB table, and let PHP handle the formatting when outputting it to the user.)
"Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
~ Terry Pratchett in Nation
How to Ask Questions the Smart Way
(not affiliated with this site, but well worth reading)
Thanks. I can't imagine i get answer so quickly.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)