Well, in my user profile page i'm trying to get user record from db by following mysql query. but it's not working :
Mysql Query (Not Working) :
$sql = mysql_query("select fname, email, find from users where email = '$username'");
but it's working fine:
Mysql Query (Working) :
$sql = mysql_query("select fname, email, find from users where email = '%$username%'");
why ?
Ok, if you said % is ok then I've another problem that is I've to update the user profile page so that i'm using following mysql query :
UPDATE users SET fname = '$uname', find = '$find' WHERE email LIKE '%$username%'
BUT after run this query it's update all the db table rows.
What should i do know ? what is the correct mysql_query?