php - Optimizing search query for multiple search criteria -


i have search functionality have multiple search criteria state,district,university,programme,level,courses, institutes etc. makes 7 search criteria. can search using 1 search criteria or or combination. have check possibility of search i.e. 2^7 combination using if-elseif loop. want avoid method of searching since day if new criteria comes increases complexity of code power of 2. there better algorithm can useful tackle performance issue search.

i implementing same using php-mysql.

regards, suvojit

build $sql string dynamically clause created using php implode. case solved


Comments

Popular posts from this blog

twig - Using Twigbridge in a Laravel 5.1 Package -

jdbc - Not able to establish database connection in eclipse -

Kivy: Swiping (Carousel & ScreenManager) -