I am doind this query
UPDATE trans t
JOIN accounts ON(t.user_id = a.id)
JOIN
(SELECT user_id FROM trans GROUP BY user_id HAVING SUM(amount) > 0.00005460 ) tt
ON(tt.user_id = a.id)
GROUP BY a.id
SET t.paidout=1
and i get this error
#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 'GROUP BY a.id SET t.paidout=1' at line 6
Any help would be apreciated
UPDATE trans t
JOIN accounts ON(t.user_id = a.id)
JOIN
(SELECT user_id FROM trans GROUP BY user_id HAVING SUM(amount) > 0.00005460 ) tt
ON(tt.user_id = a.id)
GROUP BY a.id
SET t.paidout=1
and i get this error
#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 'GROUP BY a.id SET t.paidout=1' at line 6
Any help would be apreciated