PHP mysqli_thread_safe() Function
In this chapter you will learn:
- Definition for PHP mysqli_thread_safe() Function
- Syntax for PHP mysqli_thread_safe() Function
- Parameter for PHP mysqli_thread_safe() Function
- Return for PHP mysqli_thread_safe() Function
- Example - Is the client thread safe
Definition
The mysqli_thread_safe() function returns whether the client library is compiled as thread-safe.
Syntax
PHP mysqli_thread_safe() Function has the following syntax.
mysqli_thread_safe();
Parameter
None
Return
It returns TRUE if the client library is thread-safe. FALSE otherwise.
Example
Is the client thread safe.
<?php//from ja v a 2 s .com
$con=mysqli_connect("localhost","my_user","my_password","my_db");
if (mysqli_connect_errno($con)){
echo "Failed to connect to MySQL: " . mysqli_connect_error();
}
echo mysqli_thread_safe();
mysqli_kill($con,$t_id);
?>
Next chapter...
What you will learn in the next chapter:
- Description for PHP SimpleXMLElement Create
- Syntax for PHP SimpleXMLElement Create
- Parameter for PHP SimpleXMLElement Create
- Return for PHP SimpleXMLElement Create
- Example - Create a new SimpleXMLElement object, then output the content of the body node
- Example - Create a SimpleXMLElement object from a URL
Home » PHP Tutorial » PHP MySQLi Functions