Hey, I'm having a problem getting mysql to update multiple tables at once. I keep getting a syntax error:

Here's the code I have
Code:
	 $db->sql_query("UPDATE "._USERS_TABLE." u, 
	"._REFERRALS_TABLE." r,
	"._USERS_TABLE." ru
   SET  u.user_points = u.user_points + 5, 
	r.deleteok = 1 
   WHERE  u.user_id = r.inviter_id
	AND ru.user_id = r.user_id 
	AND ru.user_points > 10
   LIMIT 1") or errmsg($db->sql_error());
Any suggestions?