Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"like" statement for search ! #210

Open
abouhanna opened this issue Sep 3, 2015 · 4 comments
Open

"like" statement for search ! #210

abouhanna opened this issue Sep 3, 2015 · 4 comments

Comments

@abouhanna
Copy link

Hello, how we can use the like statement ???

exmp :

$this->db->like('title', 'match');

// Produces: WHERE title LIKE '%match%'

get all posts that title contains the "match" string.

Tnx.

@bereldhuin
Copy link

+1 for this feature

@michail1982
Copy link

http://www.codeigniter.com/user_guide/database/query_builder.html
implementation (in MY_Model)

public function like($field, $match = '', $side = 'both', $escape = NULL) {
$this->_database->like($field, $match, $side, $escape);
return $this;
}

@abouhanna
Copy link
Author

thnx michail1982 :)

@timothymarois
Copy link

+1 for this feature. nice work @michail1982 this should be added into the next version. If the creator of this doesn't plan on updating anymore, then maybe we should create a new one fork.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants