我使用此查询将所有值插入此数据库:
INSERT INTO products ($fields) VALUES ($values)
Run Code Online (Sandbox Code Playgroud)
但是,我尝试使用相同的格式进行更新:
UPDATE products SET ($fields) VALUES ($values) WHERE sku = '$checksku'
Run Code Online (Sandbox Code Playgroud)
...而且我遇到了语法错误:
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 '('product,make,model,' at line 1
Run Code Online (Sandbox Code Playgroud)
我无法弄清楚.非常感谢任何帮助.谢谢.