Mysql 在数据库中的Prestashop中使用内部联接更新SQL

Mysql 在数据库中的Prestashop中使用内部联接更新SQL,mysql,database,sql-update,prestashop,prestashop-1.6,Mysql,Database,Sql Update,Prestashop,Prestashop 1.6,我尝试更新Prestashop表中的数量。我有一个从表“ps\u product\u attribute”获取upc的内部联接 但我总是有这样的错误: #1064 - 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 'INNER JOIN ps_product_attribut

我尝试更新Prestashop表中的数量。我有一个从表“ps\u product\u attribute”获取upc的内部联接

但我总是有这样的错误:

 #1064 - 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 'INNER
JOIN ps_product_attribute ON ps_product_attribute.id_product_attribute = p' at line 3
有人能帮我吗?我试过很多不同的东西

编辑: 我尝试了另一种方式:

通过选择,我可以使用ps\U stock\U中的id\U product\U属性

SELECT id_product_attribute
FROM ps_product_attribute
WHERE upc in ("01900000118","01900000119");
是否可以对结果进行更新

UPDATE  ps_stock_available
SET  quantity =  quantity-1
WHERE id_product_attribute in ("result1", "result2");
我找到了解决办法

SELECT sa.id_product, sa.id_product_attribute, sa.quantity, pa.upc
FROM ps_stock_available AS sa
LEFT OUTER JOIN ps_product_attribute AS pa ON pa.id_product_attribute = sa.id_product_attribute
WHERE sa.id_product = 140;

如果这是直接复制粘贴,那么查询文本中可能有错误,您看不到,这会把它搞砸。如果让我猜的话,一个零宽度或组合Unicode字符。请尝试删除受影响的部分及其周围的部分,然后从头开始重新键入。我没有unicode字符。我尝试了很多事情…我不知道该怎么办s
SELECT sa.id_product, sa.id_product_attribute, sa.quantity, pa.upc
FROM ps_stock_available AS sa
LEFT OUTER JOIN ps_product_attribute AS pa ON pa.id_product_attribute = sa.id_product_attribute
WHERE sa.id_product = 140;