[eluser]R. Oerlemans[/eluser]
Hello Everyone,
I am working on a new application, this is the first week I use CI so this is my first (and hope last) problem.
When I use the code like:
controllers/artists.php
Code:
$songsQuery = $this->db->get('songs'); // Songs query
$songsQuery = $this->db->where('artist', $getMysql->id); // Where
$songsQuery = $this->db->order_by("hits"); // Order by
$songsQuery = $this->db->limit(15); // Limit, 15 entries
views/blocks/songs
Code:
<h1><?= $Heading; ?></h1>
<ul>
<? foreach ( $songs->result_array() as $Row ) : ?>
<li><?= anchor('videos-lyrics/view/'.$Row->id.'/'.$artistRow->name.'/'.$Row->title, 'My News'); ?> <small><?= $Row->hits;?> x bekeken</small></li>
<? endforeach; ?>
</ul>
I get this error:
Quote:Fatal error: Call to undefined method CI_DB_mysql_driver::result_array() in ****/songscript/application/views/blocks/songs.php on line 4
I've searching with Google but I couldn't find the solution.
Can anybody help me?
Thanks a lot!
Kind Regards,
Ronny0
Edit: I see I'm in the wrong category/forum, sorry for that.