0

Hello

I have use 'LIKE' query in Model

$this->db->like('job_title','keywords','both');
$query = $this->db->get('job_description',$data);

which generate Query Output like

SELECT *
FROM (`job_description`)
WHERE  `job_title`  LIKE '%keywords%'
LIMIT 1  

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.

Edited by ravi142: change title

3
Contributors
2
Replies
19
Views
3 Years
Discussion Span
Last Post by veedeoo
2

Hello,

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);

Edited by catalinetu: added one more example

Votes + Comments
@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)
{

}

Edited by veedeoo: info added.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.