Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

25.3. 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 the Apache Web server.

PHP actually provides two different MySQL API extensions:

  • mysql: Available for PHP versions 4 and 5, this extension is intended for use with MySQL versions prior to MySQL 4.1. This extension does not support the improved authentication protocol used in MySQL 5.1, nor does it support prepared statements or multiple statements. If you wish to use this extension with MySQL 5.1, you will likely want to configure the MySQL server to use the --old-passwords option (see Section A.2.3, “Client does not support authentication protocol). This extension is documented on the PHP Web site at https://php.net/mysql.

  • mysqli - Stands for “MySQL, Improved”; this extension is available only in PHP 5. It is intended for use with MySQL 4.1.1 and later. This extension fully supports the authentication protocol used in MySQL 5.1, as well as the Prepared Statements and Multiple Statements APIs. In addition, this extension provides an advanced, object-oriented programming interface. You can read the documentation for the mysqli extension at https://php.net/mysqli. A helpful article can be found at https://www.zend.com/php5/articles/php5-mysqli.php.

The PHP distribution and documentation are available from the PHP Web site. MySQL provides the mysql and mysqli extensions for the Windows operating system on https://dev.mysql.com/downloads/connector/php/. You can find information why you should preferably use the extensions provided by MySQL on that page.


 
 
  Published under the terms of the GNU General Public License Design by Interspire