Welcome Guest, Not a member yet? Register   Sign In
Blog video tutorial problem
#11

[eluser]igniter23[/eluser]
I rewatched portion of the video and it is just a missing slash. It's working now. Thanks Inparo for the help.
#12

[eluser]Unknown[/eluser]
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>&lt;?=$heading?&gt;</h1>

&lt;?php foreach($query->result() as $row): ?&gt;

<h3>&lt;?=$row->Title?&gt;</h3>
<p>&lt;?=$row->Body?&gt;</p>

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

<hr>

&lt;?php endforeach; ?&gt;


&lt;/body&gt;
&lt;/html&gt;

What's happening? ...thanks
#13

[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:
&lt;html&gt;
&lt;head&gt;
&lt;title&gt;&lt;?=$title?&gt;&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
<h1>&lt;?=$heading?&gt;</h1>

&lt;?php foreach($query->result() as $row): ?&gt;

<h3>&lt;?=$row->Title?&gt;</h3>
<p>&lt;?=$row->Body?&gt;</p>

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

<hr>

&lt;?php endforeach; ?&gt;


&lt;/body&gt;
&lt;/html&gt;

What's happening? ...thanks[/quote]




Theme © iAndrew 2016 - Forum software by © MyBB