I was hoping for some help with this -- I'm not sure if I can use just
one SQL statement to pull this data out, I think I need to use two
separate statements. Can someone clarify for me?
My tables:
+-------------+ +---------------+
| people | | projects |
+-------------+ +---------------+
| people_id |-----<| project_id |
| people_name | | project_name |
+-------------+ | canceler_id |
| canceled_date |
| finisher_id |
| finished_date |
+---------------+
In the "projects" table, a project will have a project_id, a
project_name, and either a canceler_id and canceled_date or a
finisher_id and finished_date. I would like to use a query to get the
project name and the people name from the database WHERE
projects.project_id = 8 AND projects.canceler_id = people.people_id, or
projects.finisher_id = people.people_id, depending on whether the
project was finished or canceled. But I also need to be able to
determine from the query whether the project was finished or canceled.
Thanks!
Erik
----
Erik Price
Web Developer Temp
Media Lab, H.H. Brown
[EMAIL PROTECTED]
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php