CodeIgniter Forums
Question about web blog tutorial. - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived General Discussion (https://forum.codeigniter.com/forum-21.html)
+--- Thread: Question about web blog tutorial. (/thread-2759.html)



Question about web blog tutorial. - El Forum - 08-22-2007

[eluser]Unknown[/eluser]
Hello all,
I have been using CodeIgniter for about an hour now so I am pretty new. And only recently started getting interested in php. This problem i'm having might be simple, but my experience is lacking...

This is from the video tutorial.

I have my entire blog working up to this point. In the tutorial I am told to add this line in order to add a comment link to correspond to each record.

<p>&lt;?=anchor('blog/comments/'.$row->id, 'Comments');?&gt;</p>

The code runs without any problems if I remove the ".$row->id".
But when I run this code as show above, I receive this error on every record:

A PHP Error was encountered

Severity: Notice

Message: Undefined property: stdClass::$id

Filename: views/blog_view.php

Line Number: 13



My guess is that something needs to be activated somewhere, but i'm just a newbie! =P
Looking forward to rockin' some more php tutorials! Please Help! =)


Question about web blog tutorial. - El Forum - 08-22-2007

[eluser]Unknown[/eluser]
ok, I figured it out...forgot to actually add the id field to my database. oops.


Question about web blog tutorial. - El Forum - 08-23-2007

[eluser]Derek Allard[/eluser]
Glad you got it resolved rwalter. Welcome to CodeIgniter!