user4573449
user4573449

Reputation:

how to make search algorithms better in php

I am creating job portal website so I need search functionality in that. I want to make search engine better in my website.

In database, "jobs" is a table where the attributes are: job_id,job_title, location,exp, tags

I am using following code for searching.

  $que = mysql_query("select * from jobs where tags like '%{$search_keyword}%'");

It displays results. But it have some little bugs.
For example:
In "tags" I insert record that is PHP Software developer Javascript HTML CSS. (I am not inserting comma [,] between words for better searching).

My question is, when I search "PHP" keyword it display that record successfully but when I search "PHP developer" it is not displaying that record.
I want to display both PHP and PHP developer according to that record. I need some other idea for that.

Upvotes: 1

Views: 652

Answers (1)

Pramod
Pramod

Reputation: 1041

Use Full text search. Research before using for better under standing. full text search. Example:

SELECT * FROM articles
-> WHERE MATCH (title,body) AGAINST ('database');

Upvotes: 2

Related Questions