![]() |
loading model result error - 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: loading model result error (/showthread.php?tid=38805) Pages:
1
2
|
loading model result error - El Forum - 02-19-2011 [eluser]roothacker[/eluser] hi i m new to codeigniter and I just start playing it i have downloaded version 2.0 and only set config.php,database.php,autoload.php for database settings and loading database library. Then I have created a controller name site.php and then created a model "site_model.php" inside this file declare a class as follows Code: <php now inside my controller "site.php" I have following code Code: <?php Now as i open site in browser giving me following error Code: db->get('test', 10); return $query->result(); } } ?> loading model result error - El Forum - 02-19-2011 [eluser]mariuskmc[/eluser] sorry .... wrong answer ... but I could not delete update post loading model result error - El Forum - 02-19-2011 [eluser]roothacker[/eluser] [quote author="mariuskmc" date="1298133009"]In controler mast have Code: function __construct() still not working Code: <?php loading model result error - El Forum - 02-19-2011 [eluser]roothacker[/eluser] i also want to post all of my code is it allowed? loading model result error - El Forum - 02-19-2011 [eluser]mariuskmc[/eluser] send to PM maybe I can help loading model result error - El Forum - 02-19-2011 [eluser]mariuskmc[/eluser] Code: function getAll() { loading model result error - El Forum - 02-19-2011 [eluser]roothacker[/eluser] I have uploaded my source code at http://www.box.net/shared/xnejcl0oxo Please download and find out whats wrong in it. loading model result error - El Forum - 02-19-2011 [eluser]mariuskmc[/eluser] in model you start with <php class Site_model extends CI_Model { must have <?php najam is great loading model result error - El Forum - 02-19-2011 [eluser]roothacker[/eluser] [quote author="mariuskmc" date="1298137014"] Code: function getAll() { I think error was related to some loader class that cant load my model Fatal error: Class 'Site_model' not found in D:\wamp\www\ci\system\core\Loader.php on line 198 loading model result error - El Forum - 02-19-2011 [eluser]mariuskmc[/eluser] must have <?php in model |