PHP Database connection practice

前端 未结 2 1497
悲&欢浪女
悲&欢浪女 2020-12-29 00:16

I have a script that connects to multiple databases (Oracle, MySQL and MSSQL), each database connection might not be used each time the script runs but all could be used in

2条回答
  •  隐瞒了意图╮
    2020-12-29 00:58

    The best performance/practice rule is simple: do connect to one database only.

    As for the connects - try to implement some database access class. Which can connect automatically on demand.

提交回复
热议问题