Mysql,mysqli,pdo's respective introduction _php tutorials

Source: Internet
Author: User
The normal MySQL connection will be discarded because of the problem of preventing SQL injection every time and it is relatively slow

Mysqli is an optimization made on the basis of a common MySQL. To be honest, it's a success. Preprocessing method completely solves the problem of SQL injection
But the only disadvantage is that the MySQL database is supported only if you don't operate another database or of course it's the best choice.
PDO is the latest form of connectivity compatible with most databases also resolves SQL injection but it also has drawbacks it only supports PHP5 versions but I heard that only this connection is supported in future PHP6.

PDO unifies all database abstraction Layer object interfaces, mysqli only unified MySQL

In short, PDO can implement the same code for different database operations, such as your migration from MySQL to MSSQL, the program basically does not need to change
and mysqli simple understanding of the non-MySQL package is good

In the case of high loads. PDO opens a long connection to get a relatively stable load "value". But efficiency is not the highest.
MySQL is the quickest. Mysqli second. Just MySQL and mysqli in high concurrency, high load on the system. The load they bear is also considerable. PDO is not.

http://www.bkjia.com/PHPjc/325969.html www.bkjia.com true http://www.bkjia.com/PHPjc/325969.html techarticle normal MySQL connection will be discarded because every time to prevent the problem of SQL injection and relatively slow mysqli is on the basis of ordinary MySQL to do an optimization to tell the truth ...

  • Related Article

    Contact Us

    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.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.