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!
https://stackoverflow.com/questions/65878361/why-am-i-getting-an-sql-syntax-error-when-trying-to-insert-data-into-a-row January 25, 2021 at 10:50AM
没有评论:
发表评论