Welcome Guest, Not a member yet? Register   Sign In
How i can write search function in CI ?
#2

[eluser]slowgary[/eluser]
Your job listings should have a relational table containing keywords, so:
Code:
jobs table
=====================
job_id
job_title
job_employer
job_salary


keywords table
=====================
job_id
keyword

Then you could use something like php's explode() function to create an array from the user's search string. Then just query for keywords that match any of the words. You may also want to look into something like mysql's SOUNDEX() for fuzzy matching, it may help you find matches even when users spell the word wrong.

Good luck.


Messages In This Thread
How i can write search function in CI ? - by El Forum - 06-25-2009, 09:40 PM
How i can write search function in CI ? - by El Forum - 06-25-2009, 10:04 PM



Theme © iAndrew 2016 - Forum software by © MyBB