MySQL Database setup

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
lyleyboy
Forum Commoner
Posts: 27
Joined: Sat Mar 18, 2006 5:05 am
Location: Birmingham, UK

MySQL Database setup

Post by lyleyboy »

Hi,

I've been wondering...

If I set up a table with an ID auto-incremented field but only set that field to a tinyint (for example) what happens when data keeps being added and the ranges gets to 255?

Will the program fail?

Thanks
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

The program will.... test it.
lyleyboy
Forum Commoner
Posts: 27
Joined: Sat Mar 18, 2006 5:05 am
Location: Birmingham, UK

Hmm

Post by lyleyboy »

So what do you suggest I set my ID fields to?

What do you use?

Trying to keep things small for speed but good enough to last.

Thanks
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

INT if not BIGINT (unsigned) at full bandwidth.
Post Reply