Brief Introduction to MYSQLI introduced in PHP5

Source: Internet
Author: User

In the newly downloaded PHP5, you will find an additional mysqli. dll. What is it? Let me briefly introduce... Mysqli. dll is an extension of PHP to mysql's new features. In PHP5, it can be loaded in php. ini. For example, I after mysql refers to improved, interface, ingenious, incompatible or incomplete (the extension is still under development because mysql4. 1. Neither MYSQL5 nor MYSQL5 has been officially launched yet, and the new features are not fully implemented.) the specific objectives of mysqli are as follows: -Simpler maintenance-better compatibility-backward compatibility with mysql (a module in PHP) has become messy and needs to be reorganized. At the same time, it is necessary to keep up with the development of MYSQL (DBMS), add support for new features, and adapt to Versions later than MYSQL (DBMS. Therefore, the features of mysqli. dll mysqli. dll are introduced:-can be used in the same way as mysql. dll-Support for OO interfaces, simple invocation-Support for mysql4. 1. new features introduced-through related functions such as mysqli_init (), you can set the use example of the advanced connection option mysqli: 1. the same method as mysql. dll in the past: Output result: Very large cities are: Mumbai (Bombay) (10500000) Seoul (9981619) S ã o Paulo (9968485) Shanghai (9696300) Jakarta (9604900) 2. use the built-in OO interface to call: Query (SELECT Name, Population FROM City order by Population desc limit 5) {print ("Very large cities are: n "); /* Fetch the results of the query */while ($ row = $ result-> fetch_assoc () {printf ("% s (% s) n ", $ row [Name], $ row [Population]);}/* Destroy the result set and free the memory used for it */$ result-> close ();} /* Close the connection */$ mysqli-> close ();?> Supported new features include Bound Parameters and Bound Results... If you are interested, you can directly see the original English: http://www.zend.com/php5/articles/php5-mysqli.php#fn3 Note: I feel this is not useful to everyone. But... I believe this will help you learn more about "changes" and better grasp the "Trends" 8 -)

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.