首页| JavaScript| HTML/CSS| Matlab| PHP| Python| Java| C/C++/VC++| C#| ASP| 其他|
购买积分 购买会员 激活码充值

您现在的位置是:虫虫源码 > PHP > 数据库连接池使用PHP和Gearman

数据库连接池使用PHP和Gearman

  • 资源大小:3.07 kB
  • 上传时间:2021-06-29
  • 下载次数:0次
  • 浏览次数:1次
  • 资源积分:1积分
  • 标      签: php 数据库 Gearman 使用 连接

资 源 简 介

An experimental connection pooling system using gearman and PHP. more information here: http://gonzalo123.wordpress.com/2010/11/01/database-connection-pooling-with-php-and-gearman/ Simple queries. And a simple error handling: ``` include("../lib/Pool/Client.php"); include("../lib/Pool/Server.php"); include("../lib/Pool/Exception.php"); include("../lib/Pool/Server/Connection.php"); include("../lib/Pool/Server/Stmt.php"); use PoolClient; $conn = Client::singleton()->getConnection(PoolConf::PG1); $sql = "SELECT * FROM TEST.TBL1"; $stmt = $conn->prepare($sql); $stmt->execute(); $data = $stmt->fetchall(); echo "count: " . count($data) . ""; try { $sql = "SELECT * TEST.NONEXISTENTTABLE"; $stmt = $conn->prepare($sql); $stmt->execute(); $data = $stmt->fetchall(); echo "

count: " . count($data) . "

";

文 件 列 表

idea3
examples
conf
lib
worker

相 关 资 源

您 可 能 感 兴 趣 的

同 类 别 推 荐

VIP VIP
0.152687s