Money - Price in Field

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
tsg
Forum Contributor
Posts: 142
Joined: Sun Jan 12, 2003 9:22 pm
Location: SE, Alabama
Contact:

Money - Price in Field

Post by tsg »

Hey,


How do I set a row for a dollar amount?? like $2.67 .. I guess I need to set the row as a decimal .. but what do I need to put in the length - values?

Int is not work ... when I input 1.45 it goes in as 1 .

Thanks,
Tim
User avatar
Sevengraff
Forum Contributor
Posts: 232
Joined: Thu Apr 25, 2002 9:34 pm
Location: California USA
Contact:

Post by Sevengraff »

try using float or double instead of int
tsg
Forum Contributor
Posts: 142
Joined: Sun Jan 12, 2003 9:22 pm
Location: SE, Alabama
Contact:

Post by tsg »

that's exactly what I was thinking .. but what goes in the other parts of that row ?
User avatar
Sevengraff
Forum Contributor
Posts: 232
Joined: Thu Apr 25, 2002 9:34 pm
Location: California USA
Contact:

Post by Sevengraff »

what do you mean, other parts?
oh, like for when you create the table .. .
CREATE TABLE `money` (
`dollar` FLOAT NOT NULL
);
Post Reply