Phone data handling in MySQL and PHP


I need to save the phones and then validate it by SMS and serve as a method of recovering your account.

According to my approach, I decided to use 3 fields in MySQL

phone BIGINT(20) // Guardar el # como tal
code_phone VARCHAR(8) // Guardar el código a comprobar
validated_phone TINYINT(3) // Si es 1 esta validado

But my question is about the country code. It will be that I insert an additional field, or instead of using BIGINT(20) step everything to a VARCHAR(n) that is more recommendable in your experience.

asked by Impulso Like 03.01.2019 в 22:02

0 answers