i have three tables,
location (location_num mediumint unsigned not null auto_increment,
location_name varchar(50) not null,
location_address varchar(50));
service_address (service_address_num mediumint unsigned not null auto_increment,
location_num mediumint not null,
foreign key (location_num) references location (location_num));
btn_has_service_address(btn varchar(10) not null,
service_address_num mediumint unsigned,
foreign key (service_address_num) references .....));
Basically, what i need is all of the names and addresses of service addresses (therefore locations) that exist in the btn_has_service_address table.
I think this will use some kind of join, but i haven't gotten to good at those yet. Basically, i need to get all of those service address nums inside the btn_has_ser.... table, then do a lookup of all of those service_addresses in the service_address table to get their location_num, and then once i have their location_num, i can print out the name.
Anybody have any ideas?
I appreciate any help.