Diff Between mysql & mysqli

Discussion in 'PHP' started by Katypeterson, Feb 11, 2014.

  1. #1
    Hi Friends

    Please anyone tell me what is the difference between mysql & mysqli?

    Thanks & Regards
    Katypeterson
     
    Katypeterson, Feb 11, 2014 IP
  2. stephan2307

    stephan2307 Well-Known Member

    Messages:
    1,277
    Likes Received:
    33
    Best Answers:
    7
    Trophy Points:
    150
    #2
    stephan2307, Feb 11, 2014 IP
  3. TerrorKalle

    TerrorKalle Well-Known Member

    Messages:
    1
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    108
    #3
    To quickly sum up what the big difference is;

    • MySQLi supports newer versions of MySQL and all of its features
    • MySQLi supports the "new" password hashing introduced in MySQL 4.1
    • MySQLi supports prepared statements
    • MySQLi comes with an optional Object Oriented interface
    • MySQLi is supported, ext/mysql is pretty much only security bug fixes-mode (its marked as deprecated and its subject to removal in a soon future version of PHP (not 5.6))
    • MySQLi is faster than ext/mysql
    • MySQLi exposes more of the MySQL C API than ext/mysql does
    Thats the basic headlines you should consider, the manual also have some great pages in regards to MySQL extensions:

    http://docs.php.net/manual/en/mysql.php
    http://docs.php.net/manual/en/mysqli.php
    http://docs.php.net/manual/en/mysqlnd.php (MySQL Native Driver, the alternative to libmysql should you be interested in some more in-depth knowledge of MySQL in PHP)
     
    TerrorKalle, Feb 11, 2014 IP
    HuggyStudios likes this.