Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.