Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
ほとんどの場合、1 つの mysql データベースと対話するスクリプトがあります。
ただし、特定の関数が呼び出されたときに、別の mysql データベースに接続してテーブルを更新するif{}場合に実行したいと考えています。trueこの後、元のデータベースで他のクエリが実行されます。
if{}
true
これを行うための適切で最も効率的な方法は何ですか?
下の道じゃない?
//do something with original db $conn->query(...); ... if (...) { // do someting with another db $another_conn->query(...); ... } $conn->query(...); ...