Menu
I am creating a website with registration and stuff.
Came to a problem that it is possible someone may try to register with the same login or with the same email that someone used before. So checking is necessary. Thought of doing this:
[code=php]$check_login=dbGetData(“select id from artist where login=$login”);
$check_email=dbGetData(“select id from artist where login=$email”);
But then thought that if there are A LOT of users, this query might be very-very slow as email and login fields are not indexed and I am not sure it is a good solution to do so.
Am I on the right track? How would you tackle this problem?