Jump to content

int(11) NOT NULL default '',


deRusett

Recommended Posts

I was just building a DB for a project I am doing

 

when it occered to me, I have never done

`something` int(11) NOT NULL default \'\',

always

`something` int(11) NOT NULL default \'0\',

 

what does mySQL do if I do

 

`something` int(11) NOT NULL default \'\',

 

 

the reason I ask is some of the formula I will be using, will talk to the something cell, will not work correctly if there is a 0 in that cell, BUT the default can not be a 1, I need it to ignore the cell if there is nothing in it.

 

I\'m about 3 or 4 tables away from even droping this file into mySQL to make DB\'s and figured it wouldn\'t hurt to throw this question out to the world and see what comes back

Link to comment
https://forums.phpfreaks.com/topic/1457-int11-not-null-default/
Share on other sites

Well it would seem that

 

`something` int(11) NOT NULL default \'\',

 

is not permitted, and one must use

 

`something` int(11) NOT NULL default \'0\',

 

everyone I have asked seems to think I will generate an error if I leave it as

 

 

`something` int(11) NOT NULL default \'\',

 

crappy!

Link to comment
https://forums.phpfreaks.com/topic/1457-int11-not-null-default/#findComment-4826
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.