Hàm thăm dò mysqli trong PHP()
Định nghĩa và cách sử dụng
Hàm poll()/mysqli_poll() được sử dụng để thăm dò kết nối.
Cú pháp
Phong cách hướng đối tượng:
$mysqli -> poll( read, error, reject, seconds, microseconds )
Phong cách thủ tục:
mysqli_poll( read, error, reject, seconds, microseconds )
Giá trị tham số
Parameter | Description |
---|---|
read | Required. Specifies a list of connections to check for outstanding results that can be read |
error | Required. Specifies a list of connections on which an error occurred, like query failure or lost connection |
reject | Required. Specifies a list of connections rejected because no asynchronous query has been run on for which the function could poll results |
seconds | Required. Specifies the maximum number of seconds to wait |
microseconds | Optional. Specifies the maximum number of microseconds to wait. Default is 0 |
Chi tiết kỹ thuật
Giá trị trả về: | Số lượng kết nối sẵn sàng khi thành công. FALSE khi thất bại |
---|---|
Phiên bản PHP: | 5,3+ |
❮ Tham khảo PHP MySQLi