djjon5 Posted December 18, 2007 Share Posted December 18, 2007 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? Quote Link to comment https://forums.phpfreaks.com/topic/82135-solved-mysql-error-field-thumbpath-doesnt-have-a-default-value/ Share on other sites More sharing options...
btherl Posted December 18, 2007 Share Posted December 18, 2007 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" Quote Link to comment https://forums.phpfreaks.com/topic/82135-solved-mysql-error-field-thumbpath-doesnt-have-a-default-value/#findComment-417438 Share on other sites More sharing options...
fenway Posted December 18, 2007 Share Posted December 18, 2007 Not sure exactly what php db wrapper is giving you that message... Quote Link to comment https://forums.phpfreaks.com/topic/82135-solved-mysql-error-field-thumbpath-doesnt-have-a-default-value/#findComment-417797 Share on other sites More sharing options...
djjon5 Posted December 18, 2007 Author Share Posted December 18, 2007 Thank You, I went in and changed the fields to NULL now i do not get that error Quote Link to comment https://forums.phpfreaks.com/topic/82135-solved-mysql-error-field-thumbpath-doesnt-have-a-default-value/#findComment-417818 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.