I want to write a Login authentication query,
I want to check user Login and password if that is found in my database i fetch his details however if i cant find exact details i want to check if only the provided username exist in the table and get his name and profile pic.
i can do some thing like ..
SELCT * FROM `use_table` WHERE `username` = 'something' AND `password` = 'something'
if the above query returns empty rows then i fire another query
SELCT `name`, `profile_pic` FROM `use_table` WHERE `username` = 'something'
I can do this using multiple queries but the tricky part is i want to do this using a single query. ANY HELP ??