Open victorhramos opened 8 years ago
Wrote simply method only to avoid that error, need some more tests and implementation:
public function _limit($sql, $limit, $offset = 1)
{
if (!is_numeric($offset)) {
$offset = 1;
}
$sql .= " LIMIT {$limit}, {$offset}";
return $sql;
}
Trying to use limit method
$this->db->limit(1);
Fatal error: Uncaught Error: Call to undefined method DB::_limit() in C:\laragon\www\codemarket\system\library\db.php:1773 Stack trace: #0
C:\laragon\www\codemarket\system\library\db.php(889): DB->_compile_select() #1