Problem with INSERT and auto_increment

Problem:

Unable to INSERT into a table with an auto_incrementing id column.

Error:

When using phpmyadmin to insert directly the error "#1264 - Out of range value adjusted for column 'columnName' at row 1" is given (or similar)

Cause:

Seems to be a "bug" in MYSQL V5 where "strict mode" has been enabled by default and isn't allowing the insertion of a blank value.

Solution:

Comment out line 87 of your my.ini file (in windows found in programme files->mysql)

Further Comments:

I've so far only encountered this on windows XP machines (simply because I haven't tried it on any others!)

Add new comment

(If you're a human, don't change the following field)
Your first name.
(If you're a human, don't change the following field)
Your first name.
(If you're a human, don't change the following field)
Your first name.

Filtered HTML

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.