Many to Many Index
Posted: Thu Nov 04, 2004 12:28 pm
Hello,
I have a table of possible chioces of services offered.
A contractor can select from this list services that he offers that will be used as search critria. I need to tie the ID from the service to the ID of the contractor.
What I have started to do is build a table with two fields, contractor_id and service_id, then when I search, I would search "SELECT contractor_id FROM lookupT WHERE service_id = '$_REQUEST['service_id'] (not $_REQUEST of course), but you know what I'm trying to do.
My question is, how should I index the fields in the lookup table?
Neither is unique. Many contractors to Many Services.
Am I going about this right?
Thanks,
dstefani
I have a table of possible chioces of services offered.
A contractor can select from this list services that he offers that will be used as search critria. I need to tie the ID from the service to the ID of the contractor.
What I have started to do is build a table with two fields, contractor_id and service_id, then when I search, I would search "SELECT contractor_id FROM lookupT WHERE service_id = '$_REQUEST['service_id'] (not $_REQUEST of course), but you know what I'm trying to do.
My question is, how should I index the fields in the lookup table?
Neither is unique. Many contractors to Many Services.
Am I going about this right?
Thanks,
dstefani