"SELECT * FROM ".$tabla." JOIN $tabla2 WHERE ".$tabla.".".$campo." <=1 AND ".$tabla2.".".$campo2." = P"