[eluser]Rick Blackdog[/eluser]
Hey folks, I'm rather embarrassed to be asking this and I'm sure the answer is straightforward. I'm just new to frameworks and have settled on codeigniter as my weapon of choice.
Just following the creat a blog in 20 mins guide and trying to replicate some of it...
Here's the error I see when I call the listing_view.php page:
Quote:A PHP Error was encountered
Severity: Notice
Message: Undefined variable: query
Filename: views/listing_view.php
Line Number: 3
Fatal error: Call to a member function result() on a non-object in /Applications/MAMP/htdocs/weknowagood/test/system/application/views/listing_view.php on line 3
and here's the code from that file:
Code:
<ul><?php foreach($query->result() as $row): ?>
<li><?=$row->company?></li>
<?php endforeach; ?></ul>
Can't see where I'm going wrong but I suspect it's a configuration problem. I've removed index.php with .htaccess (that's working ok).
Any ideas - thanks for the help! :red:
Rick