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?

 

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"

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.