|
View:
New views
5 Messages
—
Rating Filter:
Alert me
|
|
|
seoparator helpWas wondering if anyone could help me with this little problem I'm having. I'd like to have a comma separator after every 3 digits. E.g "3,000,000". How would i go about this?
www.coderewind.com Best Place to hunt for Code |
|
|
Re: seoparator helpNot really a MySQL problem, this is a presentation problem. MySQL will
store the number as digits only (unless you are storing in a character field - but why would you?). If using PHP, for instance, the output of the field would be number_format($fieldvalue) or if you want the answer to two decimal places number_format($fieldvalue, 2) Regards Terry http://booksihaveread.awardspace.co.uk ----- Original Message ----- > *From:* coolcoder <bless1_4u@...> > *To:* mysql@... > *Date:* Thu, 23 Aug 2007 03:55:27 -0700 (PDT) > > Was wondering if anyone could help me with this little problem I'm > having. > I'd like to have a comma separator after every 3 digits. E.g > "3,000,000". > How would i go about this? > > > > > > > www.coderewind.com > Best Place to hunt for Code > -- > View this message in context: > http://www.nabble.com/seoparator-help-tf4316769.html#a12291343 > Sent from the MySQL - General mailing list archive at Nabble.com. > -- No virus found in this outgoing message. Checked by AVG. Version: 7.5.484 / Virus Database: 269.12.2/967 - Release Date: 22/08/2007 18:51 -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/mysql?unsub=lists@... |
|
|
RE: seoparator helpmysql> select format(3000000,0);
+-------------------+ | format(3000000,0) | +-------------------+ | 3,000,000 | +-------------------+ 1 row in set (0.00 sec) mysql> select format(3000000,2); +-------------------+ | format(3000000,2) | +-------------------+ | 3,000,000.00 | +-------------------+ 1 row in set (0.00 sec) Cheers, Andrew -----Original Message----- From: coolcoder [mailto:bless1_4u@...] Sent: Thu, 23 August 2007 11:55 To: mysql@... Subject: seoparator help Was wondering if anyone could help me with this little problem I'm having. I'd like to have a comma separator after every 3 digits. E.g "3,000,000". How would i go about this? This message has been scanned for viruses by BlackSpider MailControl - www.blackspider.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/mysql?unsub=lists@... |
|
|
RE: seoparator helpLearn something every day.....
TFT ----- Original Message ----- > *From:* "Andrew Braithwaite" <andrew.braithwaite@...> > *To:* "coolcoder" <bless1_4u@...>, <mysql@...> > *Date:* Thu, 23 Aug 2007 14:19:25 +0100 > > mysql> select format(3000000,0); > +-------------------+ > | format(3000000,0) | > +-------------------+ > | 3,000,000 | > +-------------------+ > 1 row in set (0.00 sec) > > mysql> select format(3000000,2); > +-------------------+ > | format(3000000,2) | > +-------------------+ > | 3,000,000.00 | > +-------------------+ > 1 row in set (0.00 sec) > > Cheers, > > Andrew > > -----Original Message----- > From: coolcoder [mailto:bless1_4u@...] > Sent: Thu, 23 August 2007 11:55 > To: mysql@... > Subject: seoparator help > > > Was wondering if anyone could help me with this little problem I'm > having. > I'd like to have a comma separator after every 3 digits. E.g > "3,000,000". > How would i go about this? > > > > > > > This message has been scanned for viruses by BlackSpider MailControl > - www.blackspider.com > > -- > MySQL General Mailing List > For list archives: http://lists.mysql.com/mysql > To unsubscribe: http://lists.mysql.com/mysql?unsub=moscow@... > > > > > -- > No virus found in this incoming message. > Checked by AVG. > Version: 7.5.484 / Virus Database: 269.12.2/967 - Release Date: > 22/08/2007 18:51 > > Terry http://booksihaveread.awardspace.co.uk -- No virus found in this outgoing message. Checked by AVG. Version: 7.5.484 / Virus Database: 269.12.4/969 - Release Date: 23/08/2007 16:04 -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/mysql?unsub=lists@... |
|
|
Re: seoparator helpThanks for the help i have got it correct.
|
| Free embeddable forum powered by Nabble | Forum Help |