Welcome Guest, Not a member yet? Register   Sign In
Problem in display (view)
#1

[eluser]johnmiller[/eluser]
Hey...

I have a table called 'users' with fields 'name, address'.

There are 100 records in this table.

I need to display all the 100 records in the 'view'.

But I am getting only one record(first record).

How to write the view which displays all the 100 records?

Can you please help me?

The below given are the model and controller

Model (blogmodel.php)

Code:
<?php

class Blogmodel extends  Model {

function select_entries()
{
    $this->db->select('name, address');
    $query = $this->db->get('users');
    return $query->row_array();

}
}
?>

Controller (blog.php)

Code:
<?php

class Blog Extends Controller {

function index()
{  
    $this->load->model('blogmodel');
    $data['query'] = $this->blogmodel->select_entries();
    $this->load->view('blogview', $data);
}
}

?>


Messages In This Thread
Problem in display (view) - by El Forum - 07-23-2008, 03:15 PM
Problem in display (view) - by El Forum - 07-23-2008, 03:37 PM
Problem in display (view) - by El Forum - 07-23-2008, 09:25 PM



Theme © iAndrew 2016 - Forum software by © MyBB