Hi,
I would like to setup a field in a table that stores numbers. I would like to make sure that any comma or decimal points that may try to be entered into the database will be igorned.
What 'type' should I setup in my table for this column?
integer - an integer will allow for negative values too
integer unsigned if you will never have negative values .. 0 is a valid number for unsigned.
i'm thinking it will error if you send it a comma though .. i think it will just drop decimals.
"123,456.789" is a string, not a number. You'll need to strip these characters with PHP (look at number_format()) before entering them into an INT field in MySQL.