Mysqli is php5 after the function, no open extension of friends can open your php.ini profile, compared to MySQL has a lot of new features and advantages, need to know the friend can refer to Mysqli is php5 after the function, Friends who do not have an extension enabled can open your php.ini configuration file. Look for the following statement: extension=php_mysqli.dll modify it to: extension=Php_mysqli.dll. There are many new features and benefits relative to MySQL (1) support for local bindings, preparation (prepare), and other syntax (2) error codes for executing SQL statements (3 ) executes multiple SQL simultaneously ( 4 The method of object-oriented calling interface is also provided. Below one by one use PHP instance for mysqli database connection! Use method One: Use the traditional process-oriented approach PHP code is as follows:
Use method Two: Use the object-oriented method to call the interface (recommended) look at the PHP code as follows:
The above two PHP instances run exactly the same results, and you can clearly see the benefits of building a database connection using the Mysqli class Object!
How to connect to a database after PHP opens mysqli extension