What would I use

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
Pineriver
Forum Commoner
Posts: 50
Joined: Fri Aug 15, 2003 5:24 pm

What would I use

Post by Pineriver »

Hi I am not as smart as you when it comes to setting up but I am upgrading my application to mysql and want to know what column types would I use for simple values like "true" or "false" ?

I'm thinking maybe like TINYTEXT but thats a type that can fit in 255 characters or less which would there be a more suidable smaller type for this? I wouldn't want the client mysql databases to become to huge.
User avatar
pickle
Briney Mod
Posts: 6445
Joined: Mon Jan 19, 2004 6:11 pm
Location: 53.01N x 112.48W
Contact:

Post by pickle »

You can declare them as 'bool', which is just a shortcut to tinyint(1).
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
User avatar
infolock
DevNet Resident
Posts: 1708
Joined: Wed Sep 25, 2002 7:47 pm

Post by infolock »

you could also use ENUM('Y','N')
Pineriver
Forum Commoner
Posts: 50
Joined: Fri Aug 15, 2003 5:24 pm

RE

Post by Pineriver »

Thanks guys!
Post Reply