Welcome Guest, Not a member yet? Register   Sign In
Question about web blog tutorial.
#1

[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! =)
#2

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

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




Theme © iAndrew 2016 - Forum software by © MyBB