View Single Post
  #8 (permalink)  
Old 07-14-2004, 04:46 PM
steve0 steve0 is offline
WebProWorld Pro
 

Join Date: May 2004
Location: Austin, TX
Posts: 199
steve0 RepRank 0
Default

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.)
__________________
Hardcore Programming Solutions and Coffee Drinker
Reply With Quote