Mysql Php Api; Overview Of The Mysql Php Drivers - Oracle 5.0 Reference Manual

Table of Contents

Advertisement

20.7. MySQL PHP API

PHP is a server-side, HTML-embedded scripting language that may be used to create dynamic Web
pages. It is available for most operating systems and Web servers, and can access most common
databases, including MySQL. PHP may be run as a separate program or compiled as a module for use
with a Web server.
PHP provides three different MySQL API extensions:
Section 20.7.3, "MySQL Improved Extension
extension is available as of PHP 5.0.0. It is intended for use with MySQL 4.1.1 and later. This
extension fully supports the authentication protocol used in MySQL 5.0, as well as the Prepared
Statements and Multiple Statements APIs. In addition, this extension provides an advanced, object-
oriented programming interface.
Section 20.7.4, "MySQL Functions (PDO_MYSQL)
a MySQL driver for the PHP database abstraction layer PDO (PHP Data Objects). The PDO MySQL
driver sits in the layer below PDO itself, and provides MySQL-specific functionality. This extension is
available as of PHP 5.1.0.
Section 20.7.2, "Original MySQL API
is intended for use with MySQL versions prior to MySQL 4.1. This extension does not support the
improved authentication protocol used in MySQL 4.1, nor does it support prepared statements or
multiple statements. To use this extension with MySQL 4.1, you will likely configure the MySQL
server to set the
not support authentication
This extension is deprecated as of PHP 5.5.0, and its use is highly discouraged. All users
are encouraged to migrate to either
Section 20.7.1.3, "Choosing an
The PHP distribution and documentation are available from the
Portions of this section are Copyright (c) 1997-2012 the PHP Documentation Group This material may
be distributed only subject to the terms and conditions set forth in the Creative Commons Attribution
3.0 License or later. A copy of the Creative Commons Attribution 3.0 license is distributed with this
manual. The latest version is presently available at http://creativecommons.org/licenses/by/3.0/.

20.7.1. Overview of the MySQL PHP drivers

Copyright 1997-2012 the PHP Documentation Group. [2230]
20.7.1.1. Introduction
There are three PHP APIs for accessing the MySQL database. This guide explains the
describe each API, information about
MySQL
library to use
with the API.
20.7.1.2. Terminology overview
Copyright 1997-2012 the PHP Documentation Group. [2230]
This section provides an introduction to the options available to you when developing a PHP
application that needs to interact with a MySQL database.
What is an API?
An Application Programming Interface, or API, defines the classes, methods, functions and variables
that your application will need to call in order to carry out its desired task. In the case of PHP
MySQL PHP API
(Mysql)": Available for PHP versions 4 and 5, this extension
[480]
old_passwords
protocol").
mysqli
API".
choosing which API
(Mysqli)": Stands for "MySQL, Improved"; this
(MySQL
(PDO))": Not its own API, but instead it's
system variable to 1 (see
or PDO_MySQL. For further information, see
PHP Web
to use, and also information to help choose which
2230
Section C.5.2.4,
"Client does
site.
terminology
used to

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the 5.0 and is the answer not in the manual?

Questions and answers

This manual is also suitable for:

Mysql 5.0

Table of Contents