(error #1064) You have an error in your SQL syntax
#6

Oh, I see. You are trying to insert id via subselecting max id from the table. Well, that's not the way to do it. Is your id column set to `AUTO_INCREMENT`? If yes, then you don't have to pass anything (or pass null to use default value (auto incremented id in this case) if you don't specify which fields you are inserting)
Reply


Messages In This Thread
(error #1064) You have an error in your SQL syntax - by Lirbo - 04.01.2018, 17:03
Re: (error #1064) You have an error in your SQL syntax - by Misiur - 04.01.2018, 17:19
Re: (error #1064) You have an error in your SQL syntax - by Lirbo - 04.01.2018, 17:27
Re: (error #1064) You have an error in your SQL syntax - by Misiur - 04.01.2018, 17:41
Re: (error #1064) You have an error in your SQL syntax - by Lirbo - 04.01.2018, 17:46
Re: (error #1064) You have an error in your SQL syntax - by Misiur - 04.01.2018, 18:33
Re: (error #1064) You have an error in your SQL syntax - by Lirbo - 04.01.2018, 18:44

Forum Jump:


Users browsing this thread: 1 Guest(s)