Problem retreiving results from database |
[eluser]jonhurlock[/eluser]
Hi all, When I go to the following URL http://mydomain.com/boats/index on mysite I get the following error: Code: Fatal error: Class 'CI_DB_result' not found in /the-path-to-my-directory/system/database/drivers/mysql/mysql_result.php on line 27 Best, Jon Controller:boats.php Code: <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); Code: <?php Code: <?php foreach ($boats as $boat): ?>
[eluser]bobbob[/eluser]
try $this->load->database(); in the controller before loading the model as I have sometimes had issues loading models etc inside models
[eluser]InsiteFX[/eluser]
Do a var_dump to see if you are returning any records, being as you are checking for that in your model method! You should be checking in your model method for the num_rows() returned. Code: var_dump($this->boats_model->get_boats()); |
Welcome Guest, Not a member yet? Register Sign In |