Personalized lists similar to Whatsapp

Hello, I would like to compare the list of all users of my application with the list of contacts of the current user. This comparison uses the mobile number in international format as a criterion. So I would like each user of my application to have their own list which includes their contacts who are users of my app. An additional difficulty also lies in the fact that on the mobile side contacts can have several telephone numbers registered (in this case the list has the following format - for example: +336857505, +339123456…). Does anyone have a solution? Thank you in advance for your solutions

If I understand correctly, you have;
Master list:
<phone_number_1>
<phone_number_2>

Current user list:
<phone_number_x>
<phone_number_y>

And you want to see if any of the current user’s phone numbers are in the master list or ALL of the ucrrent user’s numbers are in the master list?

Yes and :
Master list:
<phone_number_1>
<phone_number_2>
<phone_number_3>
<phone_number_4>

Current user list:
<phone_number_x>
<phone_number_y>
<phone_number_z>

if x=1 and z=4

So Current user Contact list:
<phone_number_x>
<phone_number_z>

in this way each user will have a personalized contact list (Current user Contact list) and will be able to contact their friends who are registered on the app.

You need another data table that has 2 fields, one for the phone number and one for the user it belongs to. If you have two users in your db and one user had 3 phone numbers and the other user has 2, then there are 5 records in your new table. Once this is set up, then you can do a search with a constraint that uses the “contains” keyword

This topic was automatically closed after 70 days. New replies are no longer allowed.