Web Hosting Talk







View Full Version : just curious about something.......


matt2kjones
11-10-2002, 07:17 PM
Ok im just curious

But if you have a mysql table

with the fields postid, post_heading, and post_body.

what happens, if you have limited post id to 4 characters in length.

and the last postid is 9999 and someone tries to add a post with the postid 10000???

im just curious thats all :)

Rich2k
11-10-2002, 07:35 PM
You'll probably get a sql error.

However you should be aware there are limits on the size of a field type apart from character length.

e.g TINYINT has a signed range of -128 to 127 and an unsigned range of 0 to 255. Go above that and you'll either get an error or it'll just ignore it. I came across this the other day but I can't for the life of me remember what happened :)

Bulldog
11-10-2002, 08:29 PM
Generally it will give you an error and won't even insert the data into the table.