Jump to content

[SOLVED] MySQL Error: Field 'thumbPath' doesn't have a default value


djjon5

Recommended Posts

MySQL version is 5.0.45

 

I have a form that is updating a product db. I used the dreamweaver insert record wizard, and purposly excluded the thumbPath field to be done on a seperate page. When i attempt to add a product it takes me to this error on a blank page: Field 'thumbPath' doesn't have a default value

 

I added this field to my database after the table was created and have since updated it and rerun the wizard to build a new form, without posting to this field.

 

does this have something to do with the NULL option in PHPmyAdmin?

 

Link to comment
Share on other sites

Based on general sql knowledge rather than knowledge of this specific application, I would say yes it is to do with the null option.

 

Let's say you defined thumbPath to be "not null", and also didn't give it a default value.  Then you entered data into that tables but didn't say what thumbPath should be.  Then what is the database supposed to do?  If the column was nullable then it would put null in there to mean "unknown" or "no value".  Or if you set a default value, then it could use the default.  But if you said it can't use null and didn't give it a default, then it just gives up and says "I can't do that"

Link to comment
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.