[eluser]Usama Ahmed[/eluser]
Hi Petmot,
The problem is inside your sql query. You are probably not fetching the field 'id' inside it.
[quote author="Petmot" date="1232948324"]Hello Guys!
I am starting with the Codeigniter and I am also following the tutorial. I'm getting the following error message:
----------------------------------------
A PHP Error was encountered
Severity: Notice
Message: Undefined property: stdClass::$id
Filename: views/blogview.php
Line Number: 13
----------------------------------------
Code:
<html>
<head>
<title><?=$title?></title>
</head>
<body>
<h1><?=$heading?></h1>
<?php foreach($query->result() as $row): ?>
<h3><?=$row->Title?></h3>
<p><?=$row->Body?></p>
<p><?=anchor('blog/comments/'.$row->id, 'Comments');?></p>//Line Number 13
<hr>
<?php endforeach; ?>
</body>
</html>
What's happening? ...thanks[/quote]