Учебник по PHP

PHP ГЛАВНАЯ Введение в PHP Установка PHP Синтаксис PHP Комментарии PHP PHP-переменные PHP-эхо/печать Типы данных PHP PHP-строки PHP-номера PHP-математика PHP-константы PHP-операторы PHP Если... Иначе... Иначе PHP-переключатель PHP-циклы PHP-функции PHP-массивы PHP-суперглобальные переменные PHP регулярное выражение

PHP- формы

Обработка форм PHP Проверка формы PHP Требуется PHP-форма URL-адрес формы PHP/электронная почта PHP-форма завершена

PHP продвинутый

Дата и время PHP PHP включает Обработка файлов PHP Открытие/чтение файла PHP Создание/запись файла PHP Загрузка файла PHP PHP-куки PHP-сессии PHP-фильтры Расширенные фильтры PHP Функции обратного вызова PHP PHP JSON Исключения PHP

PHP ООП

PHP Что такое ООП PHP-классы/объекты PHP-конструктор PHP-деструктор Модификаторы доступа PHP Наследование PHP PHP-константы Абстрактные классы PHP PHP-интерфейсы Особенности PHP Статические методы PHP Статические свойства PHP Пространства имен PHP Итерации PHP

База данных MySQL

База данных MySQL Подключиться к MySQL MySQL Создать БД MySQL Создать таблицу Вставка данных MySQL MySQL Получить последний идентификатор MySQL Вставить несколько MySQL подготовлен Выбор данных MySQL MySQL Где Порядок MySQL MySQL Удалить данные Данные обновления MySQL Предельные данные MySQL

PHP XML

XML-парсеры PHP Парсер PHP SimpleXML PHP SimpleXML — Получить PHP XML Expat PHP XML DOM

PHP — АЯКС

Введение в АЯКС АЯКС PHP База данных AJAX АЯКС XML AJAX-поиск в реальном времени АЯКС-опрос

Примеры PHP

Примеры PHP PHP-компилятор PHP-викторина PHP-упражнения PHP-сертификат

Справочник по PHP

Обзор PHP PHP-массив Календарь PHP Дата PHP PHP-каталог Ошибка PHP PHP-исключение Файловая система PHP PHP-фильтр PHP FTP PHP JSON Ключевые слова PHP PHP-библиотека XML PHP-почта PHP-математика PHP Разное PHP MySQLi PHP-сеть Управление выводом PHP PHP регулярное выражение PHP SimpleXML PHP-поток PHP-строка Обработка переменных PHP XML-парсер PHP PHP-архив Часовые пояса PHP

Функции PHP MySQLi


Введение в PHP MySQLi

Функции MySQLi позволяют получить доступ к серверам баз данных MySQL.

Примечание. Расширение MySQLi предназначено для работы с MySQL версии 4.1.13 или новее.


Установка / Конфигурация среды выполнения

Чтобы функции MySQLi были доступны, вы должны скомпилировать PHP с поддержкой расширения MySQLi.

Расширение MySQLi было представлено в PHP версии 5.0.0. Собственный драйвер MySQL был включен в версию PHP 5.3.0.

Для получения подробной информации об установке перейдите по адресу: http://php.net/manual/en/mysqli.installation.php

Для получения подробной информации о конфигурации времени выполнения перейдите по адресу: http://php.net/manual/en/mysqli.configuration.php .


Функции 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