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;
The first way:Hide the middle four digits of the mobile phone number
select REPLACE(mobile, SUBSTR(mobile,4,4), 'XXXX') from sys_users
The second way:Hide the middle four digits of your mobile phone number (recommended)
select insert(mobile, 4, 4, 'XXXX') from sys_users ;
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!