jaymc Posted March 29, 2008 Share Posted March 29, 2008 I use ENUM on a field, but if a value that isnt part of ENUM is submitted rather than giving an error and discarding the query it updates the field with a NULL value Is there a way to stop this without using PHP to error check? Quote Link to comment https://forums.phpfreaks.com/topic/98511-solved-enum/ Share on other sites More sharing options...
mwasif Posted March 29, 2008 Share Posted March 29, 2008 MySQL Manual - If strict SQL mode is enabled, attempts to insert invalid ENUM values result in an error. Quote Link to comment https://forums.phpfreaks.com/topic/98511-solved-enum/#findComment-504120 Share on other sites More sharing options...
fenway Posted March 30, 2008 Share Posted March 30, 2008 MySQL Manual - If strict SQL mode is enabled, attempts to insert invalid ENUM values result in an error. You can change the sql mode for a given connection. Quote Link to comment https://forums.phpfreaks.com/topic/98511-solved-enum/#findComment-504445 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.