This query returns an error : “Subquery returns more than one row”:
UPDATE forums as f
SET f.f_last_pid = (SELECT pid FROM posts ORDER BY ptime DESC )
I know that i need to use ANY before the subquery but that won’t get the proper result I want. I want to update every row in my forums table based on the result shown from the subquery.
But (without really knowing your schema), you’re not joining these tables on anything. Every
last_pidinforumswould be updated by the last post inposts