Brief Overview of Data Types
All data is of one type or another. If you haven't had any programming, you
might not already know this. For example, "I like this website" is a phrase made up of
alphabetic characters - it is a character string. "41" is an integer. "43.345" is a floating
point number. Integer and float are also types.
In PHP and ASP, you do not have to declare the data types of your variables.
However it's important to know when creating your databases because you do have to
assign types to columns. The following will list some of the more frequently used
Column Types for MySQL (not a comprehensive list):
M: indicates maximum display size (legal max is 255)
D: applies to floating point types - number of digits following
decimal (max is 30)
||variable length character string (max length is 1-255)
||fixed length string (max length is 1-255)
|TEXT or BLOB
||max length of 65535 (2^16 - 1) characters
||small integer. Signed range is -128 to 127.
Unsigned range is 0 to 255.
||Small integer. Signed range is from -32768 to 32767.
Unsigned range from 0 to 65535.
Go to the mysql.com
site for a comprehensive list of acceptable column types and additional details.
Column Types for ASP (not a comprehensive list):
||Text field, max 255 characters or length
set by FieldSize property
||Text field, up to 65535 characters
||Numeric data used in mathematical calculations
||Currency and/or numerica data used in calculations
involving data with 1-4 decimal places. Accurate to 15 digits on left side of
decimal and to 4 on right. (Equiv to float, but much less precise).
Signed integer: ranges from negative to positive
Unsigned integer: ranges from 0 to positive values