If I understand your question, you want the course titles with keywords to appear first...
This may be over simplistic, but why not just run 2 queries?
The first being
select * from pitman_courses where Course_Title like '%$trimmed%'
with the output stating ..
"The Following Courses matched your query:"
Then
select * from pitman_courses
where `Target_Audience` like \"%$trimmed%\"
OR `Prerequisites` like \"%$trimmed%\"
OR `Aims_and_objectives` like \"%$trimmed%\"
OR `Course_Content` like \"%$trimmed%\"
order by Course_Title
with the output stating ..
"<HR>The following courses may also be of interest:"
(You may want to have the second query omit any results where Course_Title like '%$trimmed%'
to avoid duplicates.)
|