[eluser]almarjin[/eluser]
Hi,
I just can't get data from my database using the code below I followed the video tutorial and now I'm creating a website but this code does'nt work.
on the controller
$data['query'] = $this->db->get('phones');
on the view
<?php foreach($query->result() as $row):?>
<h3><?=$row->phone?></h3>
<p><?=$row->userid?></p>
<p><?=anchor('blog/comments/'.$row->id, 'Comment');?></p>
<hr>
<?php endforeach;?>
if I try to echo the $query the error below appears
A PHP Error was encountered
Severity: 4096
Message: Object of class CI_DB_mysql_result could not be converted to string
Filename: phones/detail.php
Line Number: 135
thanks