Hello all,
I'm new at this, so please be gentle. I'm using MySQL with ColdFusion, and need a way to display a list of data from one table when a user selects a particular system. I know I need to use a three-way join to get where I need to go, but I'm getting lost along the way. Here's my setup:
----------------------- ---------------------------- ------------------------
| wsh02 | | ie_wsh02_tid00 | | tids |
----------------------- ---------------------------- ------------------------
id (pk) id (pk) tids_id (pk)
system wsh_id project_name
tids_id
A simple queries runs and provides the user with a system from wsh02. From that page I need to be able to show all the related project names (from tids). I've tried the query below, but it keeps returning zero records (and I know there are 11 related records).
select system, w.id, project_name
from wsh02 w, tids t, ie_wsh02_tid00 i
where w.id = i.id
and t.tids_id = i.wsh_id
and i.wsh_id = 1;
I think I'm missing something simple, but I don't know where. Any help is appreciated.
I'm new at this, so please be gentle. I'm using MySQL with ColdFusion, and need a way to display a list of data from one table when a user selects a particular system. I know I need to use a three-way join to get where I need to go, but I'm getting lost along the way. Here's my setup:
----------------------- ---------------------------- ------------------------
| wsh02 | | ie_wsh02_tid00 | | tids |
----------------------- ---------------------------- ------------------------
id (pk) id (pk) tids_id (pk)
system wsh_id project_name
tids_id
A simple queries runs and provides the user with a system from wsh02. From that page I need to be able to show all the related project names (from tids). I've tried the query below, but it keeps returning zero records (and I know there are 11 related records).
select system, w.id, project_name
from wsh02 w, tids t, ie_wsh02_tid00 i
where w.id = i.id
and t.tids_id = i.wsh_id
and i.wsh_id = 1;
I think I'm missing something simple, but I don't know where. Any help is appreciated.