php connection pooling mysql

后端 未结 6 1127
眼角桃花
眼角桃花 2020-12-02 23:55

I am planning to use MYSQL. Is there a connection pooling extension available? Or what is the normal practice for connection? Is this the one used in every where...

6条回答
  •  旧巷少年郎
    2020-12-03 00:11

    use the mysqli or the PDO extension instead of the old mysql extension.

    you can tell the mysqli_connect or mysqli::__construct to use persistent connection, if you prefix your hostname with 'p:'

    http://php.net/manual/en/mysqli.construct.php

提交回复
热议问题