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

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -