略微加速

PHP官方手册 - 互联网笔记

PHP - Manual: cubrid_get_query_timeout

2024-12-22

cubrid_get_query_timeout

(PECL CUBRID >= 8.4.1)

cubrid_get_query_timeoutGet the query timeout value of the request

说明

cubrid_get_query_timeout(resource $req_identifier): int

The cubrid_get_query_timeout() function is used to get the query timeout of the request.

参数

req_identifier

Request identifier.

返回值

Returns the query timeout value in milliseconds of the current request on success, 或者在失败时返回 false.

范例

示例 #1 cubrid_get_query_timeout() example

<?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($req1000);
$timeout cubrid_get_query_timeout($req);
var_dump($timeout);

cubrid_close($conn);
?>

以上例程会输出:

int(5000)
int(1000)

参见

add a noteadd a note

User Contributed Notes

There are no user contributed notes for this page.

官方地址:https://www.php.net/manual/en/function.cubrid-get-query-timeout.php

北京半月雨文化科技有限公司.版权所有 京ICP备12026184号-3