I have 3 x tables LOG, SERVICES, SERVICELINKS.
LOG is used to write new records to.
SERVICES has a list of items that a LOG record may/may not have any number of references to.
Referencing is done by using table SERVICELINKS.
SERVICELINKS includes LOG_ID & SERVICES_ID.
I'm attempting to create a search form which allows users to enter multiple (up to 3) SERVICES_ID.
If multiple SERVICES_ID are selected they can choose if it is an AND or OR link between each Service.
The OR search is straight forward, having an issue with the AND side.
SELECT DISTINCT LOG.*
FROM Log INNER JOIN SERVICELINKS ON LOG.LOG_ID = SERVICELINKS.LOG_ID
WHERE WhereString (Variable which is generated, example OR is below)
ORDER BY LOG.LOG_DATE;
WhereString working sample for OR;
(((SERVICELINKS.SERVICES_ID)=364)) OR (((SERVICELINKS.SERVICES_ID)=264))
The solution should resolve multiple SERVICE_ID's that have the same LOG_ID.
Thanks in advance for any help given.
LOG is used to write new records to.
SERVICES has a list of items that a LOG record may/may not have any number of references to.
Referencing is done by using table SERVICELINKS.
SERVICELINKS includes LOG_ID & SERVICES_ID.
I'm attempting to create a search form which allows users to enter multiple (up to 3) SERVICES_ID.
If multiple SERVICES_ID are selected they can choose if it is an AND or OR link between each Service.
The OR search is straight forward, having an issue with the AND side.
SELECT DISTINCT LOG.*
FROM Log INNER JOIN SERVICELINKS ON LOG.LOG_ID = SERVICELINKS.LOG_ID
WHERE WhereString (Variable which is generated, example OR is below)
ORDER BY LOG.LOG_DATE;
WhereString working sample for OR;
(((SERVICELINKS.SERVICES_ID)=364)) OR (((SERVICELINKS.SERVICES_ID)=264))
The solution should resolve multiple SERVICE_ID's that have the same LOG_ID.
Thanks in advance for any help given.