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? 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. 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. Link to comment https://forums.phpfreaks.com/topic/98511-solved-enum/#findComment-504445 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.