hello, im trying to use the Simpcms news script for my php page. but when the addons is installed etc i get this error "Out of range value adjusted for column 'id' at row 1" when trying to post anyting and was told it's my mysql side's problem and wonder if anyone knowwhy i could get this error ? the code bellow was all in "IF POST NEWS" in my admin.php file. /* IF POST NEWS ******************************************/ if (isset($_POST[title])) { $_POST[text]=str_replace("'","\'",$_POST[text]); $news=mysql_query("INSERT INTO news(id,title,text,cat,tags,main,time) VALUES('','$_POST[title]','$_POST[text]','$_POST[cat]','$_POST[tags]','$_POST[main]','$time')") or die (mysql_error()); echo "News Submitted<hr>"; } /* IF POST NEWS ******************************************/ PHP:
the problem isn't the max value of the integer field, but the STRICT_MODE setting of your mysql server. You're trying to insert an empty string '' into an INT field. If the STRICT_MODE is set to STRICT_MODE_TRANS, mysql will throw an error saying the value is out of range. You can change the strict mode by editing the my.ini or my.cfg file of your mysql server. If you don't have access to your sql server, you will have to alter your scripts