Wednesday, 21 August 2013

php mysql query select match exact word

php mysql query select match exact word

I want to select the match exact word from table, but i got a problem that
if row like : Angel and i did select * from table where row = "angel" it
success and first
letter is small and in db its capital,
$r = mysql_fetch_row(mysql_query("SELECT ID FROM Login WHERE Username =
'angel' And Password = 'zxc'"));
if($r[0])
die("success");
else
die("failed");
In mysql Table
Username : varchar(50) : Angel
Password varchar(50) : zxc
results should be falied
because its Angel not angel
so any solution for it

No comments:

Post a Comment