Jump to content

Site Search function


jboog

Recommended Posts

I've got a site with several different types of objects and search forms for each. I'm not sure the most efficient(server-utilization-wise) way to implement the search results. The queries are almost all join statements and I have a fairly heavy organizing function the be sure the most relevant results come up first. The results will be split into multiple pages. Is it better to redo the search/organizing function on each page of results or to store the final array as a session variable...or other?

 

Thanks

Jared

Link to comment
https://forums.phpfreaks.com/topic/44729-site-search-function/
Share on other sites

Its not generating the queries I'm worried about, but executing the queries and the organizing function that sorts the results by relevance. I'd prefer not to have to redo it with each page of results. Then again, I'm not sure if its more efficient to store a large result array as a $_SESSION variable. I admit I haven't had a chance to go through all the OOP stuff from boo_lolly (unfortunately this is a free time project), maybe just a yes or no if there is an alternative to those two options...  Thanks for all the help

Link to comment
https://forums.phpfreaks.com/topic/44729-site-search-function/#findComment-217581
Share on other sites

the second 'tut' in the list is probably what you're looking for:

http://www.tonymarston.net/php-mysql/databaseobjects.html

 

this will help you dynamicise your queries. for your particular project i think you'd benefit from following it in an OO fashion. This way, you can break down the queries from vast to specific by extending your parent classes. try to get a graphical (visual) representation of the way you want your queries to be robust, and then impliment them by using classes.

Link to comment
https://forums.phpfreaks.com/topic/44729-site-search-function/#findComment-217604
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.