can't even get thru tutorial without errors |
[eluser]terionm[/eluser]
its confusing to me that you don't have to declare the field names? is that right?
[eluser]Cristian Gilè[/eluser]
The model name can't be the same of the controller name. The users_model.php is right. Load it as: Code: $this->load->model('users_model'); and call its functions as: Code: $this->users_model->function_name(); Cristian Gilè
[eluser]terionm[/eluser]
where are the best tutorials obviously the devshed ones suck and don't work. now I get this error: Fatal error: Class 'Users_model' not found in C:\xampp\htdocs\auto\system\libraries\Loader.php on line 184 someone told me learning php is easy using this framework
[eluser]terionm[/eluser]
starting to think I am missing something in my installation...it all looks right but even following along with the video tutorials and using the code that come with them I am getting errors like this A PHP Error was encountered Severity: Notice Message: Undefined property: Site_model::$db Filename: models/site_model.php and yes I did copy all the library files over into the application/library folder etc...
[eluser]Cristian Gilè[/eluser]
Have you loaded the database library? http://ellislab.com/codeigniter/user-gui...cting.html Cristian Gilè
[eluser]terionm[/eluser]
yep in my config I did do that .. odd thing too, is it is returning the error twice --- one for each record in the db table...but won't load the table results here is all my code.... controller Code: <?php Model: Code: <?php view: Code: <html>
[eluser]Cristian Gilè[/eluser]
Have you autoloaded it in the autoload.php file? Code: $autoload['libraries'] = array('database'); Cristian Gilè
[eluser]terionm[/eluser]
yep it's autoloaded and my other config file is set up for my db etc...
[eluser]terionm[/eluser]
WWWOOOHOOOO I got it...I goofed the field name in the view file instead of users should of been username...it friggin is working...jeeesh only took all day lmao. |
Welcome Guest, Not a member yet? Register Sign In |