Use mysql_pconnect () or mysql_connect ()? Mysql_pconnect () & nbsp; and & nbsp; mysql_connect () & nbsp? I have seen that many of them use & nbsp; mysql_connect () & nbsp; and mysql_pconnect () & nbsp; will use mysql_pconnect () or mysql_connect ()?
The difference between mysql_pconnect () and mysql_connect () is clear to me. which one do you usually use? Many of my views use mysql_connect (). does mysql_pconnect () have any negative impact?
------ Solution --------------------
Generally, mysql_connect is used for web sites. a single user does not frequently call the database and there is no need to keep the connection. In addition, the number of connections to mysql is also limited. Generally, there are 1000 connections, when a user does not release a connection for a long time, it is easy to cause the mysql connection to be full, so that other users cannot access the database, and then cannot access the website normally. I just learned this. I used to use mysql_pconnect and Khan.
------ Solution --------------------
Generally, mysql_connect is used for web sites. a single user does not frequently call the database, and there is no need to maintain the connection.
----------------------------------------------
Not very agree, unless you generate HTML
------ Solution --------------------
It is better to use mysql_connect by default.
The connect function in the dbstuff class of discuz is a function with parameters, and then select it when calling it.
The default value is mysql_connect.
Generally, the database will not be accessed frequently and repeatedly. In fact, if the database is not large in size, the pressure on connecting to the database is not great.