Home > Backend Development > PHP Tutorial > PHP persistent connection mysql_pconnect usage example

PHP persistent connection mysql_pconnect usage example

WBOY
Release: 2016-07-25 09:05:42
Original
1137 people have browsed it
  1. $conn = mysql_pconnect($host,$user,$pwd);
  2. mysql_select_db($dbname,$conn);
  3. $result=mysql_query("select * from table_name where col_id =' test_id'", $conn);
  4. $result_detail=mysql_fetch_array($result);
  5. $item = $result_detail['col_id'];
  6. ?>
Copy code

Note: as a high-concurrency processing database When requesting, using mysql_pconnect is not a good choice. At this time, issues such as caching and decentralization can be considered.



source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template