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

(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
Reply
#2

(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..

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

or something like this

Code:
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...
Reply
#3

Would this work with InnoDB?
Reply
#4

Trick question, @ivantcholakov... Smile)
Reply
#5

@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
Reply
#6

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

(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?
Reply
#8

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

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




Theme © iAndrew 2016 - Forum software by © MyBB