Hi guys.

I am just curious about the limitations of different INT data types in phpMyAdmin.

I use phpMyAdmin to store databases and tables.

And obviously, when working within a table I will usually create an 'id' column and set it to an INT data type and 'auto increment'.

The thing is, in the book I have been learning php from, the author set the 'id' field as a 'SMALL INT'.

I have recently built a reviews application for a client of mine.... so his customers can leave testimonials on his website.

And when someone leaves a review, it inserts a row inside a table on the database.

And I have set an 'id' field and made it a 'SMALL INT' auto increment (inside this table I am refering to).

What I want to know is,,, once this 'SMALL INT' data type reaches it's limit, what will happen???

Will my clients application just simply stop working once a certain number of rows have been inserted?

Paul.

    My suggestion is to figure out what the maximum value might be (whether that is a best case or worst case?) and plan accordingly. Saving a few bytes on the disk and possibly a couple microseconds' worth of data transfer time may not be worth the hassle of a program crash in the future. 🙂

      In that case.

      To avoid my code from failing to work correctly, I would probably be best choosing the standard INT data type,,, rather than SMALLINT,, or MEDIUM INT,,, etc.. ??

        Write a Reply...