One query, 3 updates?
Posted: Thu Apr 14, 2005 10:13 am
Is it possible to have three update queries in one?
Code: Select all
query("UPDATE $UserDB.unz_users SET pcount = pcount + 1 WHERE uid = '$uid'") or die_query(1);
query("UPDATE $forumzDB.forumz_threads SET replies = replies + 1, lp_time = '$time' WHERE tid = '$tid'") or die_query(3);//add one to the replies
query("UPDATE $forumzDB.forumz_forums SET postCount = postCount + 1 WHERE fid = '$fid'") or die_query(4);//add one post to total
#query is a custom function