Home>Article>Backend Development> Some summaries and examples about php mysqli functions (4)

Some summaries and examples about php mysqli functions (4)

王林
王林 Original
2019-08-16 18:06:55 2256browse

Foreword: PHP is a programming language that is relatively easy to get started with, and PHP has a lot of built-in functions. Therefore, it is particularly important to understand and master these built-in functions. Next we will analyze some of the built-in functions of PHP.

I will continue to organize it for you in the future.

Recommended related video tutorials://m.sbmmt.com/course/list/29/type/4.html

About the understanding of phpMysqli functions:

1. What is php mysqli?

php mysqli = php nysqli improved

The mysqli function allows you to access the database server.

Notice! The mysqli extension is available for mysqli version 4.1.13 or newer.

2. How to use mysqli function?

If you want to use the mysqli function, you must add support for the mysqli extension when compiling php.

For more information about installation, please visit:http://www.php.net/manual/en/mysqli.installation.php

For details about running configuration Detailed information address:http://www.php.net/manual/en/mysqli.configuration.php

3. Introduction to php related functions

1,mysqli_debug(message)Function

Description: Used to perform debugging operations and return true.

Note; In order to use this function, you must compile the mysql client library to support debugging.

2,mysqli_dump_debug_info(link)Function

Description: Dump debugging information into the log, return true if successful, false if failed.

3,mysqli_error_list()Function

Description: Returns the error list of the recently called function, each error has an errno, error , associative array of sqlstate.

4,mysqli_state(connection)Function

Description: Return the current system state.

Example:

5,mysqli_fetch_all(result,resulttype)Function

Return typeresulttype:

MYSQLI_ASSOC

MYSQLI_NUM

MYSQLI_BOTH

Description: From Take all rows from the result set as an associative array or an indexed array or both.

Examples:

The above is the introduction and examples of phpmysqli functions compiled for you this time. I hope it can help you. Thanks!

Recommended related articles://m.sbmmt.com/course/list/29/type/4.html

The above is the detailed content of Some summaries and examples about php mysqli functions (4). For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn