PHP mysqli_thread_safe() Function

In this chapter you will learn:

  1. Definition for PHP mysqli_thread_safe() Function
  2. Syntax for PHP mysqli_thread_safe() Function
  3. Parameter for PHP mysqli_thread_safe() Function
  4. Return for PHP mysqli_thread_safe() Function
  5. 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:

  1. Description for PHP SimpleXMLElement Create
  2. Syntax for PHP SimpleXMLElement Create
  3. Parameter for PHP SimpleXMLElement Create
  4. Return for PHP SimpleXMLElement Create
  5. Example - Create a new SimpleXMLElement object, then output the content of the body node
  6. Example - Create a SimpleXMLElement object from a URL
Home » PHP Tutorial » PHP MySQLi Functions
PHP mysqli_affected_rows() Function
PHP mysqli_autocommit() Function
PHP mysqli_change_user() Function
PHP mysqli_character_set_name() Function
PHP mysqli_close() Function
PHP mysqli_commit() Function
PHP mysqli_connect() Function
PHP mysqli_connect_errno() Function
PHP mysqli_connect_error() Function
PHP mysqli_data_seek() Function
PHP mysqli_dump_debug_info() Function
PHP mysqli_errno() Function
PHP mysqli_error() Function
PHP mysqli_error_list() Function
PHP mysqli_fetch_all() Function
PHP mysqli_fetch_array() Function
PHP mysqli_fetch_assoc() Function
PHP mysqli_fetch_field() Function
PHP mysqli_fetch_field_direct() Function
PHP mysqli_fetch_fields() Function
PHP mysqli_fetch_lengths() Function
PHP mysqli_fetch_object() Function
PHP mysqli_fetch_row() Function
PHP mysqli_field_count() Function
PHP mysqli_field_seek() Function
PHP mysqli_field_tell() Function
PHP mysqli_free_result() Function
PHP mysqli_get_charset() Function
PHP mysqli_get_client_info() Function
PHP mysqli_get_client_stats() Function
PHP mysqli_get_client_version() Function
PHP mysqli_get_connection_stats() Function
PHP mysqli_get_host_info() Function
PHP mysqli_get_proto_info() Function
PHP mysqli_get_server_info() Function
PHP mysqli_get_server_version() Function
PHP mysqli_info() Function
PHP mysqli_init() Function
PHP mysqli_insert_id() Function
PHP mysqli_kill() Function
PHP mysqli_more_results() Function
PHP mysqli_multi_query() Function
PHP mysqli_next_result() Function
PHP mysqli_num_fields() Function
PHP mysqli_num_rows() Function
PHP mysqli_options() Function
PHP mysqli_ping() Function
PHP mysqli_query() Function
PHP mysqli_real_connect() Function
PHP mysqli_real_escape_string() Function
PHP mysqli_refresh() Function
PHP mysqli_rollback() Function
PHP mysqli_select_db() Function
PHP mysqli_set_charset() Function
PHP mysqli_sqlstate() Function
PHP mysqli_ssl_set() Function
PHP mysqli_stat() Function
PHP mysqli_stmt_init() Function
PHP MySQL mysqli_thread_id() Function
PHP mysqli_thread_safe() Function