I need to grab information from multiple tables and it doesnt seem to work. I need to grab other info from a table named users and I named all of the fields a different name as well so they would not overwrite each other. Here is the code where I am calling it:

PHP Code:
$sql="SELECT * FROM team WHERE staff_user='$myusername' and staff_pass='$mypassword'";

$result=mysql_query($sql);

$count=mysql_num_rows($result);

if(
$count==1){

session_register("myusername");

while(
$row mysql_fetch_assoc($result))

    {

        
$_SESSION['staff_first_name']=$row['staff_first_name'];

        
$_SESSION['staff_last_name']=$row['staff_last_name'];

        
$_SESSION['staff_user']=$row['staff_user'];

        
$_SESSION['staff_p_extranet']=$row['staff_p_extranet'];

        
$_SESSION['staff_p_mail']=$row['staff_p_mail'];

        
$_SESSION['staff_p_client_list']=$row['staff_p_client_list'];

    } 
Any idea? I tried to do a SELECT * from team, users but it gave me an error.