Hi guys,
I am writing some SQL to query a database to see if a username already exists, what I have so far is the following:
Now, this kind of works, for example if I enter a random username it will inform me that that is fine and I can carry on, and if I insert a username I know exists such as 'james' it tells me that already exists, so great.
But if I enter 'jamesjames' into the system, it also tells me that this exusts, when it doesn't!
Anyone any ideas on why this could be?
Kind Regards,
Basher
I am writing some SQL to query a database to see if a username already exists, what I have so far is the following:
Code:
SELECT COUNT(login) as Expr1
FROM tblEmployee
WHERE login=@login
Now, this kind of works, for example if I enter a random username it will inform me that that is fine and I can carry on, and if I insert a username I know exists such as 'james' it tells me that already exists, so great.
But if I enter 'jamesjames' into the system, it also tells me that this exusts, when it doesn't!
Anyone any ideas on why this could be?
Kind Regards,
Basher