* [EMAIL PROTECTED]
>   Is there a MySQL data type to use in a column where I would like an
> integer to be comma delimited? Say someone enters "1000000" as a value to
> be written to the column. I would like it to be stored as "1,000,000". I
> don't want trailing decimals either.

Integers are stored in a binary format, you can not change this.

You should not care about how mysql stores the values, only about how they
are displayed. Take a look at the FORMAT() function:

<URL: http://www.mysql.com/doc/en/Miscellaneous_functions.html >

mysql> select format(1000000,0);
+-------------------+
| format(1000000,0) |
+-------------------+
| 1,000,000         |
+-------------------+
1 row in set (0.00 sec)

--
Roger


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to