[英]Query Syntax Error for UPDATE with INNER JOIN
Hey i have an update query with an inner join but i cannot get the syntax correct to make it work... this is what i currently have: 嘿,我有一个内部连接的更新查询,但我无法使语法正确,使其工作...这是我目前有:
UPDATE t1
SET t1.quantity = t1.quantity - ? FROM items t1
INNER JOIN users t2 ON t1.id=t2.id
WHERE t1.item_id=? AND t2.uid= ?
The syntax error says its near here: 语法错误说它在附近:
near 'FROM items t1 INNER JOIN users t2 ON t1.id=
I'm using pdo
encase you wondered why i have question marks! 我正在使用
pdo
包装你想知道为什么我有问号!
Hope you can help! 希望你能帮忙!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.