Is there a way to do this? I am trying to write a video search engine for my website which has a
database of videos that stores the following information (among other
things): "Title", "Keywords", and "Description".
The goal of this search engine is to have a user type in a query and
then have it return results where any of those fields match using the
'LIKE' command. However, I want all of the videos with titles matching
to be shown before those with keywords matching, and then the ones
with description matching.
Obviously this can be done with 3 commands but based on my current
configuration it would be REALLY nice if I could do it with one result
set. For example, pagination. If I want to limit results to 10 per
page it is difficult to use the LIMIT command over 3 different sql
statements.
I was thinking something with GROUP maybe?? But I feel like that can
only be done over fields. Any thoughts?? |