I have two tables which I want to update using an SQL Update statement. These two tables contains a row named "oak" and "exp" which is the values I want to update. My best guess so far is this:
'UPDATE `items_woods`, `skills_woodcutting` SET `oak`=`oak`+1, `exp`=`exp`+13 WHERE `id`=?'
However, none of the values are saved in the database. Thanks in advance.
UPDATE:
if ($stmt = $mysqli->prepare('
BEGIN TRANSACTION
UPDATE items_woods
SET items_woods.oak = ´1´
FROM items_woods T1, skills_woodcutting T2
WHERE T1.id = T2.id
and T1.id = ´?´
UPDATE skills_woodcutting
SET skills_woodcutting.exp = ´1´
FROM items_woods T1, skills_woodcutting T2
WHERE T1.id = T2.id
and T1.id = ´?´
COMMIT
')) {