在表之间加入

I have a little trouble with a query.

I have this DB structure

PROCESSES process_id process_name

ITENS item_id item_process_id item_name

FILES file_id file_item_id file_name

I run this query to obtain Process ID:

$result = mysql_query("SELECT * FROM processes WHERE process_id='$process_id'");
$row = mysql_fetch_array($result, MYSQL_BOTH);
$process_id = $row['process_id'];

Put this ID in a LOOP to obtain all Itens from table:

$query="SELECT * FROM itens WHERE item_process_id='$process_id'";
$result = mysql_query($query) or die(mysql_error());
$num = mysql_numrows($result);

And call Item name into a LOOP

Problem is when i try to call "file_name" from FILES table. I have tried with a LEFT JOIN to table but with no success. "file_name" variable is blank

Can anyone help me to understand how solve this?

TKS

Try LEFT JOIN files ON file_id = file_item_id