Priority on ORDER BY Field in search engines
3 posts by 2 authors in: Forums > CMS Builder
Last Post: January 20, 2012 (RSS)
By Djulia - January 17, 2012 - edited: January 21, 2012
Hi,
I have two fields on which I make a search (title,content_query).
I would like to give a priority in the results to the first field (title) if the word that I search is in the title.
I tested ORDER BY Field(title,'High'), but that does not function.
Does somebody have another suggestion?
Thanks!
Djulia
I have two fields on which I make a search (title,content_query).
I would like to give a priority in the results to the first field (title) if the word that I search is in the title.
I tested ORDER BY Field(title,'High'), but that does not function.
Does somebody have another suggestion?
Thanks!
Djulia
Re: [Djulia] Priority on ORDER BY Field in search engines
By Jason - January 18, 2012
Hi,
You could try something like this in the orderBy option:
Hope this helps
You could try something like this in the orderBy option:
'orderBy' => "(NOT (title LIKE '%".mysql_escape(@$_REQUEST['title,content_query'])."%'))",
Hope this helps
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com
Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/
Jason Sauchuk - Project Manager
interactivetools.com
Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/
Re: [Jason] Priority on ORDER BY Field in search engines
By Djulia - January 20, 2012
Hi Jason,
It is perfect! Thanks! :)
Djulia
It is perfect! Thanks! :)
Djulia