Good day. I have a very interesting question. In general, why when adding a non-existent value ('') in the field with a NOT NULL token, the query occurs and inserts a new record. Although, while returning Warning, but why Warning, and not Fatal Error?
Listing:
CREATE TABLE IF NOT EXISTS `exotichoroscopes_data` ( `id` int(4) NOT NULL AUTO_INCREMENT, `type` int(2) NOT NULL, `zodiac` int(1) DEFAULT NULL, `date_begin` varchar(10) DEFAULT NULL, `date_end` varchar(10) DEFAULT NULL, `name` varchar(200) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=4 ; In the type field it is not allowed to add an empty value! Same as in name .