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

gcc - MinGW's ld cannot perform PE operations on non PE output file -

timeout - Handshake_timeout on RabbitMQ using python and pika from remote vm -

c# - Search and Add Comment with OpenXML for Word -