First, the MYSQLI connection is a permanent connection, and MySQL is a non-permanent connection.
The MySQL connection will reopen a new process whenever it is used for the second time, while Mysqli will only use the same process, which can greatly reduce the server-side pressure.
Second, mysqli encapsulates some advanced operations, such as transactions, while encapsulating many of the methods available in the DB operation process.
The most widely used place is the mysqli transaction.
Example:
=Mysqli (' localhost ', ' root ', ' ', ' db_lib2test ')< span="">< span=""> < span="">->autocommit (); < span=""> < span=""> ->query < span="">( < span=""> < span=""> < span=""> < span=""> ->query ( < span=""> < span=""> < span=""> < span="">< span=""> < span="">(! < span=""> , < span=""> < span=""> < span=""> < span=""> ' OK ' < span=""> }< span=""> < span=""> < span=""> < span=""> ' err < span=""> ' < span=""> < span=""> < span=""> < span=""> -- < span=""> } < span=""> < span=""> < span=""> < span="">
http://www.bkjia.com/PHPjc/440300.html www.bkjia.com true http://www.bkjia.com/PHPjc/440300.html techarticle First, the MYSQLI connection is a permanent connection, and MySQL is a non-permanent connection. The MySQL connection will reopen a new process whenever it is used for the second time, and Mysqli will only use the same one ...