(PECL CUBRID >= 8.4.1)
cubrid_get_query_timeout — 获取请求的查询超时值
cubrid_get_query_timeout() 函数用于获取请求的查询超时时间。
req_identifier
请求标识符。
如果成功,则返回当前请求的查询超时值(以毫秒为单位),否则返回 **false
**。
示例 #1 cubrid_get_query_timeout() 示例
<?php
$host = "localhost";
$port = 33000;
$db = "demodb";
$conn =
cubrid_connect_with_url("CUBRID:$host:$port:$db:::?login_timeout=50000&query_timeout=5000&disconnect_on_query_timeout=yes");
$req = cubrid_prepare($conn, "SELECT * FROM code");
$timeout = cubrid_get_query_timeout($req);
var_dump($timeout);
cubrid_set_query_timeout($req, 1000);
$timeout = cubrid_get_query_timeout($req);
var_dump($timeout);
cubrid_close($conn);
?>
上面的示例将输出
int(5000) int(1000)