I have use 'LIKE' query in Model

$query = $this->db->get('job_description',$data);

which generate Query Output like

FROM (`job_description`)
WHERE  `job_title`  LIKE '%keywords%'

Problem: How could i remove the LIMIT that automatic generate in Query OR can i given Infinite LIMIT in CI Query.

Can you Suggest me..

Thank You.

Recommended Answers

All 2 Replies


Try this:

$query = $this->db->get('mytable', 10, 20);

// Produces: SELECT * FROM mytable LIMIT 20, 10 (in MySQL. Other databases have slightly different syntax)

or this

$query = $this->db->get_where('mytable', array('id' => $id), $limit, $offset);

commented: @Thank you +1

catalinetu is correct, just add second and third parameter to the get method. Derived from this

public function get($table = '', $limit = null, $offset = null)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.