Membahas Fungsi-Fungsi MySQLi

Membahas Fungsi-Fungsi MySQLi

MySQLi (My Structured Query Language) adalah sebuah extension PHP yang digunakan untuk berkomunikasi dengan database MySQL. Dalam artikel ini, kita akan membahas berbagai fungsi-fungsi yang tersedia dalam MySQLi.

Initialization dan Prepared Statement

  • mysqli::stmt_init – Initializes a statement and returns an object for use with mysqli_stmt_prepare
  • mysqli_stmt::prepare – Prepares an SQL statement for execution
  • mysqli_stmt::bind_param – Binds variables to a prepared statement as parameters
  • mysqli_stmt::execute – Executes a prepared statement

Result Set

  • mysqli_result – The mysqli_result class
  • mysqli_result::__construct – Constructs a mysqli_result object
  • mysqli_result::fetch_array – Fetch the next row of a result set as an associative, a numeric array, or both
  • mysqli_result::fetch_assoc – Fetch the next row of a result set as an associative array
  • mysqli_result::fetch_object – Fetch the next row of a result set as an object

Error dan Warnings

  • mysqli::$errno – Returns the error code for the most recent statement call
  • mysqli::$error – Returns a string description for last statement error
  • mysqli::$error_list – Returns a list of errors from the last statement executed
  • mysqli_warning – The mysqli_warning class
  • mysqli_warning::next – Fetch next warning

Lain-lain

  • mysqli::use_result – Initiates a result set retrieval
  • mysqli::$thread_id – Returns the thread ID for the current connection
  • mysqli::store_result – Transfers a result set from the last query
  • mysqli_driver – The mysqli_driver class
  • mysqli_driver::embedded_server_end – Stop embedded server
  • mysqli_driver::embedded_server_start – Initialize and start embedded server

Dalam kesimpulan, MySQLi adalah sebuah extension PHP yang digunakan untuk berkomunikasi dengan database MySQL. Berbagai fungsi-fungsi yang tersedia dalam MySQLi dapat digunakan untuk mengelola database dan memperbaiki error serta warnings.