![]() |
Error Number 1054 on CRUD application - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Error Number 1054 on CRUD application (/showthread.php?tid=57448) Pages:
1
2
|
Error Number 1054 on CRUD application - El Forum - 03-15-2013 [eluser]ede196620[/eluser] i am getting this error anyone know what is could be the cause of this ? i think its something with the model but cant figure out. Code: Error Number: 1054 MODEL Code: class Display_model extends CI_Model{ Error Number 1054 on CRUD application - El Forum - 03-15-2013 [eluser]TheFuzzy0ne[/eluser] Whats your table structure for tblquestions? Error Number 1054 on CRUD application - El Forum - 03-15-2013 [eluser]TheFuzzy0ne[/eluser] You have defined your primary key as being "QID", so where's "id" coming from? Error Number 1054 on CRUD application - El Forum - 03-15-2013 [eluser]ede196620[/eluser] so instead id it should be $primary_key or jest QID ? Error Number 1054 on CRUD application - El Forum - 03-15-2013 [eluser]TheFuzzy0ne[/eluser] Surely that would be better off written as: Code: function get_paged_list($limit=10, $offset=0, $order_column='', $order_type='asc') Error Number 1054 on CRUD application - El Forum - 03-15-2013 [eluser]ede196620[/eluser] i tried your example and it dose look like the logical solution but i am still getting the same error Error Number 1054 on CRUD application - El Forum - 03-15-2013 [eluser]TheFuzzy0ne[/eluser] That's because you're trying to sort by a column that doesn't exist in your database. You have no 'id' column, but you're passing that into the method as the sort column. Error Number 1054 on CRUD application - El Forum - 03-15-2013 [eluser]ede196620[/eluser] i tried your solution it dose look as the logical solution but i am still getting the same error Error Number 1054 on CRUD application - El Forum - 03-15-2013 [eluser]ede196620[/eluser] i though i was passing this private $primary_key='QID'; as my id . Is that not correct ? Error Number 1054 on CRUD application - El Forum - 03-15-2013 [eluser]TheFuzzy0ne[/eluser] Please post your controller code. |