I have 3 join table with many to many relation to another table, and keep the info of users. in search, I have 2 drop down which are depended (the first one is category and the second one is subcategory - " get the value from many to many table" -), also some users didnt set their sub category.(the sub category value store in many to many table)
Problem: when we choose only category,we get result, if we choose category and subcategory, the browser try to show the result but after some minutes, time out, and it crashing and show some incorrect result.
i think it happen, because, users didnt set the sub category and it loops in the database to find it and then crashes. can we personalize the search to show, if it has subcategory show if not remove from result page ?
the second problem, i want the search session be clean after some minute or if they left the page!(only search session).? because,if user search and come back again they see the result , not the whole record (we have also the reset)
please help with that.