Tutorial PHP

RUMAH PHP Pengenalan PHP Instal PHP Sintaks PHP Komentar PHP Variabel PHP PHP Gema / Cetak Tipe Data PHP String PHP Nomor PHP PHP Matematika Konstanta PHP Operator PHP PHP Jika...Lain...Elseif Beralih PHP PHP Loop Fungsi PHP Array PHP PHP Superglobal PHP RegEx

Formulir PHP

Penanganan Formulir PHP Validasi Formulir PHP Diperlukan Formulir PHP URL/Email Formulir PHP Formulir PHP Lengkap

PHP Lanjutan

Tanggal dan Waktu PHP PHP Termasuk Penanganan File PHP File PHP Buka/Baca Membuat/Menulis File PHP Unggah File PHP Cookie PHP Sesi PHP Filter PHP Filter PHP Tingkat Lanjut Fungsi Panggilan Balik PHP PHP JSON Pengecualian PHP

PHP OOP

PHP Apa itu OOP Kelas/Objek PHP Konstruktor PHP Penghancur PHP Pengubah Akses PHP Warisan PHP Konstanta PHP Kelas Abstrak PHP Antarmuka PHP Ciri-ciri PHP Metode Statis PHP Properti Statis PHP Ruang Nama PHP PHP Iterable

Database MySQL

Database MySQL Koneksi MySQL MySQL Buat DB MySQL Buat Tabel MySQL Sisipkan Data MySQL Dapatkan ID Terakhir MySQL Sisipkan Beberapa MySQL Disiapkan MySQL Pilih Data MySQL Dimana MySQL Dipesan Oleh MySQL Hapus Data Data Pembaruan MySQL Data Batas MySQL

PHP XML

PHP XML Parser PHP SimpleXML Parser PHP SimpleXML - Dapatkan PHP XML Ekspat PHP XML DOM

PHP - AJAX

Pengenalan AJAX AJAX PHP Basis Data AJAX AJAX XML Pencarian Langsung AJAX Jajak Pendapat AJAX

Contoh PHP

Contoh PHP Kompilator PHP Kuis PHP Latihan PHP Sertifikat PHP

Referensi PHP

Ikhtisar PHP Array PHP Kalender PHP Tanggal PHP Direktori PHP Kesalahan PHP Pengecualian PHP Sistem File PHP Filter PHP PHP FTP PHP JSON Kata Kunci PHP PHP Libxml Surat PHP PHP Matematika PHP Lain-lain PHP MySQLi Jaringan PHP Kontrol Keluaran PHP PHP RegEx PHP SimpleXML Aliran PHP String PHP Penanganan Variabel PHP PHP XML Parser PHP Zip Zona Waktu PHP

Fungsi PHP MySQLi


Pengenalan PHP MySQLi

Fungsi MySQLi memungkinkan Anda untuk mengakses server database MySQL.

Catatan: Ekstensi MySQLi dirancang untuk bekerja dengan MySQL versi 4.1.13 atau yang lebih baru.


Instalasi / Konfigurasi Runtime

Agar fungsi MySQLi tersedia, Anda harus mengkompilasi PHP dengan dukungan untuk ekstensi MySQLi.

Ekstensi MySQLi diperkenalkan dengan PHP versi 5.0.0. Driver Asli MySQL disertakan dalam PHP versi 5.3.0.

Untuk detail instalasi, kunjungi: http://php.net/manual/en/mysqli.installation.php

Untuk detail konfigurasi runtime, kunjungi: http://php.net/manual/en/mysqli.configuration.php


Fungsi PHP MySQLi

Function Description
affected_rows() Returns the number of affected rows in the previous MySQL operation
autocommit() Turns on or off auto-committing database modifications
begin_transaction() Starts a transaction
change_user() Changes the user of the specified database connection
character_set_name() Returns the default character set for the database connection
close() Closes a previously opened database connection
commit() Commits the current transaction
connect() Opens a new connection to the MySQL server
connect_errno() Returns the error code from the last connection error
connect_error() Returns the error description from the last connection error
data_seek() Adjusts the result pointer to an arbitrary row in the result-set
debug() Performs debugging operations
dump_debug_info() Dumps debugging info into the log
errno() Returns the last error code for the most recent function call
error() Returns the last error description for the most recent function call
error_list() Returns a list of errors for the most recent function call
fetch_all() Fetches all result rows as an associative array, a numeric array, or both
fetch_array() Fetches a result row as an associative, a numeric array, or both
fetch_assoc() Fetches a result row as an associative array
fetch_field() Returns the next field in the result-set, as an object
fetch_field_direct() Returns meta-data for a single field in the result-set, as an object
fetch_fields() Returns an array of objects that represent the fields in a result-set
fetch_lengths() Returns the lengths of the columns of the current row in the result-set
fetch_object() Returns the current row of a result-set, as an object
fetch_row() Fetches one row from a result-set and returns it as an enumerated array
field_count() Returns the number of columns for the most recent query
field_seek() Sets the field cursor to the given field offset
get_charset() Returns a character set object
get_client_info() Returns the MySQL client library version
get_client_stats() Returns statistics about client per-process
get_client_version() Returns the MySQL client library version as an integer
get_connection_stats() Returns statistics about the client connection
get_host_info() Returns the MySQL server hostname and the connection type
get_proto_info() Returns the MySQL protocol version
get_server_info() Returns the MySQL server version
get_server_version() Returns the MySQL server version as an integer
info() Returns information about the last executed query
init() Initializes MySQLi and returns a resource for use with real_connect()
insert_id() Returns the auto-generated id from the last query
kill() Asks the server to kill a MySQL thread
more_results() Checks if there are more results from a multi query
multi_query() Performs one or more queries on the database
next_result() Prepares the next result-set from multi_query()
options() Sets extra connect options and affect behavior for a connection
ping() Pings a server connection, or tries to reconnect if the connection has gone down
poll() Polls connections
prepare() Prepares an SQL statement for execution
query() Performs a query against a database
real_connect() Opens a new connection to the MySQL server
real_escape_string() Escapes special characters in a string for use in an SQL statement
real_query() Executes a single SQL query
reap_async_query() Returns result from an async SQL query
refresh() Refreshes/flushes tables or caches, or resets the replication server information
rollback() Rolls back the current transaction for the database
select_db() Select the default database for database queries
set_charset() Sets the default client character set
set_local_infile_default() Unsets user defined handler for load local infile command
set_local_infile_handler() Set callback function for LOAD DATA LOCAL INFILE command
sqlstate() Returns the SQLSTATE error code for the error
ssl_set() Used to establish secure connections using SSL
stat() Returns the current system status
stmt_init() Initializes a statement and returns an object for use with stmt_prepare()
store_result() Transfers a result-set from the last query
thread_id() Returns the thread ID for the current connection
thread_safe() Returns whether the client library is compiled as thread-safe
use_result() Initiates the retrieval of a result-set from the last query executed
warning_count() Returns the number of warnings from the last query in the connection