what do i do, with this error in codeigniter?
A Database Error Occurred Error Number: 1064
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'show' at line 1
SELECT @rownum:=@rownum+1 rownum, t.* FROM (SELECT @rownum:=0) r, hotel_submits t order by id desc LIMIT 2, show
Filename: D:\xampp\htdocs\mehdi\system\database\DB_driver.php
Line Number: 330
code:
$data['results'] = $this->db->query("SELECT @rownum:=@rownum+1 rownum, t.* FROM (SELECT @rownum:=0) r, hotel_submits t order by id desc LIMIT ".$config['per_page'].", ".$this->uri->segment(3)."");
You're not using the Codeigniter Pagination class properly.
See my answer to your other question: create jquery pagination?
Your
$config['base_url']
needs your controller and method names, like so:$this->uri->segment(3)
is returning the stringshow
, wich is not a validLIMIT
value.I suppose you're calling the wrong segment.