Okay, so I have a client who wants to output all information for a bunch of students in a system.

This output is to be imported into Excel to be manipulated.

So, my problem is that I would like to output all students' information from 4 tables

auditions
scheduled auditions
profiles
audition times

So, the auditions table gets and entry linking any information there to the student WHEN the audition is recorded. Before that, there is no audition for them in the db.

So, I want to output one row for each student that says when their scheduled audition is, and then *if* they have had their audition already to import the information, but if not, to just leave the field blank.

I've got something like this so far

```
"SELECT ".$fields." FROM profiles p, auditions a, scheduled_auditions s, 
audition_times t WHERE p.id=t.id AND t.id=s.id AND a.id=p.id"

```

The problem is obvious. It's only going to output people who have auditions. So, how do I write a conditional select/where statement so to speak? I need to output this with one query so that it will work when I open it in excel.

Thanks guys. I'm stumped.