Here is a query with which I am checking whether a username is available or not in one table
$query=mysql_query("SELECT * from tb_sponsar where username='$username'");
But,I am having two more tables named tb_company and tb_school and both tables have this field named username now I want to have a query that checks usernames from all the three tables...I am new to php so don't know how to do it.can anyone please help me in this regard?
I tried it like this
$query=mysql_query("SELECT * from tb_sponsar where username='$username'" && "SELECT * from tb_company where username='$username'");
but after applying this query it is giving false result