I recognise that this is a pretty basic question and I have looked through the forums to find a close match to this, but I hope I will be able to struggle through if someone can give me an initial pointer...

Scenario - simply, each 'person' record can have up to 6 'projects', each project code held in a different field. I just need to be able to display the project descriptor from the project table, and I really can't grasp the join syntax.

Even battling with one project code defeats me - here is the instruction I have tried so far:
$query = "SELECT * FROM person AS tp
LEFT JOIN project AS pr
ON pr.code = tp.proj1 // I would also need to match on proj2 etc
WHERE person_id='$id'";

$result = mysql_query($query);
if( !$result ){
echo mysql_error() . ": " . mysql_errno();
I then write a form which does things like:
person's name?php echo $person["tp.name"]; ?>
projcode?php echo $person["tp.proj1"]; ?> desc?php echo $person["pr.proj1"]; ?>

The result is that the MySQL does not complain, but just shows pages with all fields blank. And yes, the 'person' record does exist and shows fine if I do just the simple SELECT for id query.

Would much appreciate assistance on the basics of this and then I will not nag people for more!