Welcome Guest, Not a member yet? Register   Sign In
Does CI3 Has any search library for MySQL DB?

(This post was last modified: 03-15-2015, 11:11 PM by rakibtg.)

Does CI3 Has any search library for MySQL DB? Like full text search on which table .. etc

(This post was last modified: 03-16-2015, 03:12 AM by sajid19991. Edit Reason: spelling )

well, if there is or not....i  have decided to make it 3 days ago since i faced a lot of time wastage on search functions...so expect a library coming soon... but for now...

you can use in-built where clause for basic functions like..

$this->db->where('MATCH (content.title) AGAINST ("'. $term .'")')
$this->db->where('MATCH (content.body) AGAINST ("'. $term .'")')

or something like this

function search_results_count($terms)
       // Run Query to count the total number of search results
       $sql = "SELECT COUNT(*) AS count
                   FROM content
                   WHERE MATCH (body) AGAINST (?)";
       $query = $this->db->query($sql, array($terms));
       return $query->row()->count;

well i hope im right with those codes, been 3 years out of codeigniter...

Would this work with InnoDB?

Trick question, @ivantcholakov... Smile)

@rakibtg Why would you need a search library for interrogating the database? Go figure, for every language on this world there is another way of doing a search library... This is more like a linguistics problem, not a programming one Smile

Thanks @sajid19991 i am also doing the same Smile
@Avenirer You'r right 8-)

(03-17-2015, 10:42 PM)rakibtg Wrote: Thanks @sajid19991 i am also doing the same Smile

great....i haven't started yet so maybe if you would like i can contribute ...
created any repo yet?

Any one please take a look here> http://forum.codeigniter.com/thread-1522.html

@rakibtg I don't get it. What does that thread have to do with this one (except having the same author...)?

Theme © iAndrew 2016 - Forum software by © MyBB