At this stage PHP to operate MySQL database PHP to provide us with 3 sets of libraries1. mysql extension library for process operation2. Mysqli expansion Library object-oriented operation and process-oriented operation coexist security and
A Simple Method for PHP to use mysqli to operate MySQL databases, mysqlimysql
The mysqli extension of PHP provides all the functions of its first-line version. In addition, because MySQL is already a database server with complete features, it adds
1. DQL operation of MySQL using mysqli extension library in PHP
Copy CodeThe code is as follows:
Header ("Content-type:text/html;charset=utf-8");
mysqli working with MySQL database (object oriented approach)
1. Create a Mysqli object
$mysqli =new
1. Use mysqli extension library in PHP to perform dql operations on MySQL
PHP Header ("Content-Type: text/html; charset = UTF-8" ); // Mysqli operations on the MySQL database (Object-Oriented) // 1. Create a mysqli object $ Mysqli = New
1, in PHP using the mysqli extension library to the MySQL DQL operation
Copy Code code as follows:
Header ("Content-type:text/html;charset=utf-8");
MYSQLI operating the MySQL database (object-oriented mode)
1. Create Mysqli objects
1, in PHP using the mysqli extension library to the MySQL DQL operation
The code is as follows
Copy Code
Header ("Content-type:text/html;charset=utf-8");MYSQLI operating the MySQL database (object-oriented mode) 1.
First, MySQL and the concept of MYSQLI Related:1, MySQL and mysqli are the function set of PHP, and the MySQL database is not very relevant.2, before the PHP5 version, is generally used in PHP MySQL function to drive MySQL database, such as
Learned to use the Mysqli extension library, the overall feeling than the process-oriented approach more reasonable, object-oriented is the trend, so must not just use that set of old MySQL library, also not conducive to PHP operation of MySQL,
This article mainly introduces the PHP implementation using the MYSQLI operation MySQL database method, the interested friend's reference, hoped to have the help to everybody.
PHP's mysqli extension provides all the features of its antecedent
PHP's mysqli extension provides all the features of its antecedent version, in addition, since MySQL is already aA database server with full features, which adds some new features to PHP. And Mysqli is supporting theThese new features.A Establish
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.