Now to obtain the bands, skills and levels the follow queries are needed
SELECT * FROM search_groups WHERE category_id=
[135 returns bands]
[51 returns skills]
[136 returns levels]
Now Im a novice with Oracle SQL and other SQL. So was looking for a little help to allow to search for resources based on the title field and where the bands, skills and levels are within the checkbox values they selected
You can add the title search into Tamil's query in a couple of
ways:
1. Title specifically matches something:
SELECT *
FROM search_groups
WHERE category_id IN ( 51, 135, 136 )
AND resource_title = '????';
2. Title contains some string:
Begins with it:
SELECT *
FROM search_groups
WHERE category_id IN ( 51, 135, 136 )
AND resource_title LIKE '%';
Contains it:
SELECT *
FROM search_groups
WHERE category_id IN ( 51, 135, 136 )
AND resource_title LIKE '%%';
Ends with it:
SELECT *
FROM search_groups
WHERE category_id IN ( 51, 135, 136 )
AND resource_title LIKE '%';
You could also use the INSTR function or depending on your version you can use Oracle Text (check out CTXCAT in version 9 and up). You may also have to deal with multiple keywords on your search.
Bookmarks