Welcome Guest, Not a member yet? Register   Sign In
Find words form same column in Database (Search)
#1

(This post was last modified: 10-20-2015, 09:29 PM by ardavan.)

Hi,

im not sure my thread subject is clear or not. anyway I'm creating a search in my project.
Now I'm getting the words from search input into an array

User will key in ( php programming language ).

PHP Code:
$words explode(' '$search_text); 

Code:
$words = array('php', 'programming', 'language');

Now i need to find any TITLE match with 'php' or 'programming' or 'language'.

my DataBase is like this
Code:
TITLE         |   DESC   |   STATUS
====================================
php coding    |   blabh  |   LIVE
codeigniter 3 |   blaaaa |   LIVE
all language   |   blaaaa |   LIVE

I'm expecting to get the result like this
Code:
TITLE         |   DESC   |   STATUS
====================================
php coding    |   blabh  |   LIVE
all language   |   blaaaa |   LIVE
"Because we have php in the first title and we have language in the second title"

Im trying to get expected result like this
PHP Code:
$this->db->where_in('TITLE'$words); 

The Issue is i can only get one of my rows. (php coding)

How to make it?
Any idea?

Thanks a lot guys.
Reply


Messages In This Thread
Find words form same column in Database (Search) - by ardavan - 10-20-2015, 09:28 PM



Theme © iAndrew 2016 - Forum software by © MyBB