Home > Database > Mysql Tutorial > 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

黄舟
Release: 2017-03-21 13:56:48
Original
2233 people have browsed it

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
Copy after login

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 ;
Copy after login

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!

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