¡¡¡¡
phpÍøÕ¾ÖÆ×÷Öо³£Óöµ½ Field 'id' doesn't have a default value MYSQL¾³£Óöµ½ÕâÑùµÄ´íÎó
¸ÄÈçºÎ½â¾öÄØ
½â¾ö·½·¨ÈçÏ£º
Field 'id' doesn't have a default valueÎÊÌâ½â¾ö·½·¨
MySQL 5ÖУ¬³öÏÖ´íÎóÌáʾ£º
Field 'id' doesn't have a default value
½â¾ö·½·¨Ò»£º
´ò¿ªmy.ini£¬²éÕÒ
sql-mode="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"
ÐÞ¸ÄΪ
sql-mode="NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"
È»ºóÖØÆôMYSQL
½â¾ö·½·¨¶þ£º
MySQL 5 uses a strict mode which needs to be disabled.
In Windows, Goto Start-->Programs-->MySQL->MySQL Instance Config Wizard. Follow through the Reconfigure Instance option-->Detailed Configuration-->Continue Next a few screens. At the bottom under Enable TCP/IP option there is 'Enable Strict Mode'. Deslect this option (no tick). Save changes and MySQL will restart