Posted by Steve on 09/06/05 16:53
> I have a 'staff' table with a column 'status', corresponding to a
> 'statuses' table with the appropriate titles (eg 1 | Editor in Chief).
> I want to display on the page the headings (the titles from statuses)
> along with all of the staff members with that status ID.
You need a query that joins the two tables together. You haven't shown
the table definitions but it would look something like this:
SELECT staff.name, statuses.title
FROM staff, statuses
WHERE staff.statusid = statuses.statusid
ORDER BY statuses.rank
---
Steve
[Back to original message]
|