How can I put two queries in one mysql_query?

前端 未结 4 1534
我寻月下人不归
我寻月下人不归 2020-12-21 04:47

I\'m trying to do something like this:

mysql_query(\"
  UPDATE name SET money = money + 1;
  UPDATE surname SET money = money + 1;
\"); 

bu

4条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-21 05:33

    You should use transactions for queries that need to happen in an atomic fashion, which I suspect these may.

提交回复
热议问题