help .... I got a FATAL ERROR -- probably syntax |
[eluser]JPrieto[/eluser]
Code: <html> but i get this error: Fatal error: Call to a member function result() on a non-object in C:\wamp\www\codeigniter\system\application\views\blog_view.php on line 9 i was following along tutorial video 2 - and all was fine -- ii can able to view and create entries into the database table i spend 30-40 minute trying to figure out was is wrong here but i cant find it would appreaciate your assistance please ps: after the foreach statement i placed a : (not a since that is what is in the video
[eluser]Thorpe Obazee[/eluser]
are you sure you can retrieve data from the table? Try check if there's a result before using ->result().
[eluser]JPrieto[/eluser]
yes, i am sure i was follwing the tutorial video 2 and i was able to connect/retrieve view and create into the table
[eluser]Thorpe Obazee[/eluser]
Post your code. Have you used ->result() already in the controller or model?
[eluser]JPrieto[/eluser]
Code: <?php QUESTION: is there supposed to be a space after the word foreach in the views file?
[eluser]Thorpe Obazee[/eluser]
[quote author="JPrieto" date="1243577479"] Code: <?php I doubt that you are retrieving data. Check the query you're using. Read the user_guide [quote author="JPrieto" date="1243577479"] QUESTION: is there supposed to be a space after the word foreach in the views file?[/quote] Read the user guide
[eluser]JPrieto[/eluser]
hi again if i browse to http://localhost/codeigniter/index.php/b...lding/view it connects, retrieves, lists, edit, and deletes data how else should i test the connection?
[eluser]Thorpe Obazee[/eluser]
hmm... I don't know what was in my mind.. but I think I know now what's wrong. Is this the line 9? Code: <p><?php echo $row->body; ?></p> If it's not, then you should probably post more info.
[eluser]JPrieto[/eluser]
i do have a body field i followed the video to the letter it is why when i browse to http://localhost/codeigniter/index.php/b...lding/view it connects, retrieves, lists, edit, and deletes data this is a tough one i've been googling also nothing so far
[eluser]Thorpe Obazee[/eluser]
what's line 9? I don't think it's a tough one. You just need to post more info. |
Welcome Guest, Not a member yet? Register Sign In |