Problem with SQL (INSERT)

Hello!
Recently faced a problem: suddenly on my website all commands with “INSERT INTO” where there is a field of ID (autoincrement) (SQL) ceased to work. At the same time everything else works: UPDATE, DELETE, etc.
Stopped working “INSERT INTO” about a week ago, although the site has worked without problems for a year!
Maybe someone knows how to solve this problem?

1 Like

Please double check the autoincrement row still has autoincrement

I just found a problem: in the query, in the ID field I wrote (INSERT INTO ■■■ VALUES (’ ', ‘$_POST[■■■]’, ‘$_SESSION[■■■]’, NOW())")), and it should be with NULL like this: (INSERT INTO ■■■ VALUES (NULL, ‘$_POST[■■■]’, ‘$_SESSION[■■■]’, NOW())"))!
But still weird that the first option worked for a year and suddenly, without warning stopped working. So after all it is possible and to break the keyboard at search of an error:)
Okay, I hope this post helps someone.

1 Like