I am getting a strange MYSQL error when trying to write a row to a database - every solution I have found concerning the topic hasn't been helpful. The query being passed is this:
"INSERT INTO StaffData (StaffID,Sort,Name,Department,Occupation,Roles,Phone,Email,Notes,Password) VALUES (@StaffID,@Sort,@Name,@Department,@Occupation,@Roles,@Phone,@Email,@Notes,@Password) ON DUPLICATE KEY UPDATE"
And the return value is:
"You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1"
The strange part to me is that it doesn't say where the error in syntax is, and I'm not sure why. Every other instance of this error I have found at least provides that.
Any help would be appreciated - thanks in advance!
question from:
https://stackoverflow.com/questions/65878361/why-am-i-getting-an-sql-syntax-error-when-trying-to-insert-data-into-a-row 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…