Oracle 5.0 Reference Manual page 2449

Table of Contents

Advertisement

mysqli_use_result
20.7.3.9.57. mysqli::$thread_id,
Copyright 1997-2012 the PHP Documentation Group. [2230]
mysqli::$thread_id
mysqli_thread_id
Returns the thread ID for the current connection
Description
Object oriented style
int
mysqli->thread_id ;
Procedural style
int mysqli_thread_id(
mysqli link);
The
mysqli_thread_id
killed using the
the thread ID will be other. Therefore you should get the thread ID only when you need it.
Parameters
link
Return Values
Returns the Thread ID for the current connection.
Examples
Example 20.146.
Object oriented style
<?php
$mysqli = new mysqli("localhost", "my_user", "my_password", "world");
/* check connection */
if (mysqli_connect_errno()) {
printf("Connect failed: %s\n", mysqli_connect_error());
exit();
}
/* determine our thread id */
$thread_id = $mysqli->thread_id;
MySQL Improved Extension (Mysqli)
mysqli_thread_id
function returns the thread ID for the current connection which can then be
function. If the connection is lost and you reconnect with mysqli_ping,
mysqli_kill
Note
The thread ID is assigned on a connection-by-connection basis. Hence, if the
connection is broken and then re-established a new thread ID will be assigned.
To kill a running query you can use the SQL command
processid.
Procedural style only: A link identifier returned by
mysqli_connect
$mysqli->thread_id
or
mysqli_init
example
2429
KILL QUERY

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the 5.0 and is the answer not in the manual?

Questions and answers

This manual is also suitable for:

Mysql 5.0

Table of Contents