J
JP SIngh
Hi All
This is a complicated one, not for the faint hearted
Please help if you can how to achieve this search.
We have a freetext search entry box to allow users to search the database. I
am searching two tables.
SELECT TapeRecords.Id, TapeRecords.ItemTitle, TapeRecords.SourceRef,
TapeRecords.ItemYear, TapeRecords.TapeNumber FROM TapeRecords WHERE
TapeRecords.Id In (select tapenumber from TapeLogDetails where
TapeLogDetails.Description LIKE '%%asia%%' ) OR (TapeRecords.ItemTitle LIKE
'%%asia%%' ) OR (TapeRecords.Location LIKE '%%asia%%') OR
(TapeRecords.Country LIKE '%%asia%%') OR (TapeRecords.Keywords LIKE
'%%asia%%') ORDER BY TapeRecords.Id DESC;
The search logic also needs to allow users to search for multiple entries
for example if I was to type Asia Burma
it should find all records where asia and burma appears. Sound simple , well
it is not.
Because my researchers requires the search to work where the either of the
two words (i.e. Asia and Burma) were present in any combination of the
fields.
i.e Asia might be in description and Burma might be in any of the other
fields, i.e. to find the two keywords in any combination.
can anyone help?
This is a complicated one, not for the faint hearted
Please help if you can how to achieve this search.
We have a freetext search entry box to allow users to search the database. I
am searching two tables.
SELECT TapeRecords.Id, TapeRecords.ItemTitle, TapeRecords.SourceRef,
TapeRecords.ItemYear, TapeRecords.TapeNumber FROM TapeRecords WHERE
TapeRecords.Id In (select tapenumber from TapeLogDetails where
TapeLogDetails.Description LIKE '%%asia%%' ) OR (TapeRecords.ItemTitle LIKE
'%%asia%%' ) OR (TapeRecords.Location LIKE '%%asia%%') OR
(TapeRecords.Country LIKE '%%asia%%') OR (TapeRecords.Keywords LIKE
'%%asia%%') ORDER BY TapeRecords.Id DESC;
The search logic also needs to allow users to search for multiple entries
for example if I was to type Asia Burma
it should find all records where asia and burma appears. Sound simple , well
it is not.
Because my researchers requires the search to work where the either of the
two words (i.e. Asia and Burma) were present in any combination of the
fields.
i.e Asia might be in description and Burma might be in any of the other
fields, i.e. to find the two keywords in any combination.
can anyone help?