MySQL Type questions
#4

11 there means number of numeric characters width.. integer has 11 digits including the sign e.g. -2147483647 while unsigned integer only has 10 digits since it has no negative sign e.g. 4294967295

Integer in pawn has size of 4 bytes, within range of -2,147,483,648 (cellmin) to 2,147,483,647 (cellmax), so it will be just always fine when you store this variable to your database field in data type integer (11).

Varchar means variable length character, the string you are storing would occupy same size of the bytes (depending on the charset) plus 1, e.g.
"Hello" -> 5 characters = 6 bytes
And 128 is just the maximum size of string you want to store in the field. so you can't store longer string.

Text has a fixed width/size, if you put Text (128) that will just use 128 bytes for each field, e.g.
"Hello" -> 5 characters = 128 bytes (depends on charset)
The advantage is this will be faster to use, but consumes more memory.

Just go find documentation for "mysql data types"
https://dev.mysql.com/doc/refman/5.7/en/data-types.html

You can read that references for your usage in MySQL database.
Reply


Messages In This Thread
MySQL Type questions - by GospodinX - 11.06.2018, 13:12
Re: MySQL Type questions - by GTLS - 12.06.2018, 06:44
Re: MySQL Type questions - by Ada32 - 12.06.2018, 16:05
Re: MySQL Type questions - by RoboN1X - 12.06.2018, 18:24

Forum Jump:


Users browsing this thread: 1 Guest(s)