Home  >  Article  >  Database  >  Detailed introduction to the method of hiding the middle four digits of a mobile phone number using mysql sql statements

Detailed introduction to the method of hiding the middle four digits of a mobile phone number using mysql sql statements

黄舟
黄舟Original
2017-03-21 13:56:482163browse

This article mainly introduces in detail the method of mysql sql statement to hide the middle four digits of the mobile phone number. It has certain reference value. Interested friends can refer to it

FirstQueryTable structure (sys_users):

SELECT * from sys_users;

Detailed introduction to the method of hiding the middle four digits of a mobile phone number using mysql sql statements

The first way:Hide the middle four digits of the mobile phone number

select REPLACE(mobile, SUBSTR(mobile,4,4), 'XXXX') from sys_users

Detailed introduction to the method of hiding the middle four digits of a mobile phone number using mysql sql statements

The second way:Hide the middle four digits of your mobile phone number (recommended)

select insert(mobile, 4, 4, 'XXXX') from sys_users ;

Detailed introduction to the method of hiding the middle four digits of a mobile phone number using mysql sql statements


The above is the detailed content of Detailed introduction to the method of hiding the middle four digits of a mobile phone number using mysql sql statements. 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