Loading database content problem |
[eluser]BenSeagrave[/eluser]
I'm trying to implement a blog like feature to my website. I have inserted dummy data into my database and set up the config files in codeigniter. If you go to http://pheonixstudios.co.uk/site you can see the error that I am getting. This is my controller : Code: <?php and this is the part of the home_view.php file you will need to see: Code: <div id="primary" class="grid_15"> This is also the model: Code: <?php
[eluser]Wondering Coder[/eluser]
your using result() 3x. Remove your result() in the controller and model.
[eluser]BenSeagrave[/eluser]
But surely I need to keep the result function in the files to set it with the results from the db?
[eluser]jmadsen[/eluser]
for example: Code: if($query = $this->site_model->getRecords()) in your getRecords() function, you are returning $query->result(). so, $query = $function_query->result() then you are taking $query->result() again. so, you are really calling $query->result()->result()
[eluser]BenSeagrave[/eluser]
So can you show me what I will need to do? Like edit my code and paste it back ![]() |
Welcome Guest, Not a member yet? Register Sign In |