Home > Database > Mysql Tutorial > body text

Information functions and encryption functions of MySQL database

黄舟
Release: 2017-08-04 10:52:42
Original
1515 people have browsed it

The functions in the MySQL database can be divided into character functions, numeric operators and functions, comparison operators and functions, date and time functions, information functions, encryption functions, aggregate functions and custom functions according to their functions.

This experience will introduce the information functions and encryption functions in the database in detail. I hope it will be helpful to everyone's work and study!

Information functions and encryption functions of MySQL database

Information function

1.CONNECTION_ID()

CONNECTION_ID() returns the connection ID (thread ID) , as shown in the figure below:

Information functions and encryption functions of MySQL database

2.DATEBASE()

DATEBASE() returns the current database name, as shown in the figure below :

Information functions and encryption functions of MySQL database

3.LAST_INSERT_ID()

LAST_INSERT_ID() returns the ID of the last inserted record, when writing multiple records at once When recording, the ID returned by the function is the ID of the first record, as shown in the following figure:

Information functions and encryption functions of MySQL database

Information functions and encryption functions of MySQL database

4.USER ()

USER() returns the current user.

5.VERSION()

##VERSION() returns version information, as shown in the figure below:

Information functions and encryption functions of MySQL database

Encryption function

1.MD5()

MD5(): Information digest algorithm, to prepare for future Web pages, try to use MD5().

2.PASSWORD()

PASSWORD(): Password algorithm, use PASSWORD() to modify the passwords of the current user and other users, and modify the client's own password. As shown below:

Information functions and encryption functions of MySQL database

The above is the detailed content of Information functions and encryption functions of MySQL database. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template