Codeigniter Search by category and or question title. |
I am trying to be able to create a search model function all in one.
Where if user types in some thing like how to It will search for that match title in questions But the if the user would like to search for all questions in a category it will display all questions belong to that category. I have this model function PHP Code: public function getQuestions($search = NULL) { I have also tried using or_where PHP Code: public function getQuestions($search = NULL) { It seems to display it twice as shown in image and not correct questions Quote:Question: if use trys to search for a question it will try and find it in questions but if the user searches for a category it will display all questions belong to that category how can I make that work in one model function using join Search url when searching for all questions in category Code: http://localhost/project-ask/questions/tagged/codeigniter Search URL when searching for question Code: http://localhost/project-ask/questions/tagged/how-to
There's only one rule - please don't tell anyone to go and read the manual. Sometimes the manual just SUCKS!
I think I may have it working now
PHP Code: public function getQuestions($search = NULL) {
There's only one rule - please don't tell anyone to go and read the manual. Sometimes the manual just SUCKS!
|
Welcome Guest, Not a member yet? Register Sign In |