Well that's really weird...
I know that the queries are indeed working. They work on their own, but when I put one after the other like I showed before, it doesn't seem to work properly. However, if I add sleep(), like this:
mysql_query("UPDATE table SET a=1");
sleep(1);
mysql_query("UPDATE table2 SET a=1");
It works! The only problem is, they build up over time, and it gets really annoying to have to wait for things to happen. If I had 6 updates going, for example, I would have to put 5 sleeps in between them for it to work. That's 5 seconds of waiting, for something that should only take milliseconds or less. I tried using usleep(), but if it's too short of a time, it does the same thing as if it weren't there! (No, I'm not running Windows, so usleep() does indeed work.)
So... I don't know what the heck is wrong then.