I have a table in MySql, the table has 3 fields (name, date, number). The table connected to my app via PHP.
What I need is to make MySql to accept only English numbers. I don't want to do it via PHP, is there any way to do it in MySql to restrict it from accepting such as (Arabic, Parisian).
If there's any options can I do it from MySql.
You can verify that easily with a regex,
SELECT * FROM yourTable WHERE number REGEXP '^[0-9]*$';
Edit : If your goal is only to block Arabic text, then here a regex that would select only
ASCII character from the space to the tild(0-127).
SELECT * FROM yourTable where number REGEXP '^[ -~]*$'