Welcome Guest, Not a member yet? Register   Sign In
Pagination and table error.
#8

[eluser]davidMC1982[/eluser]
I have no idea what you're trying to achieve. It looks like your view() function is trying to display the details of a question, but you are trying to load the view that displays the list of questions.

Change your view function to:

Code:
function view($id){
  // set common properties
  $data['title'] = 'Question Details';
  $data['link_back'] = anchor('display/index/','List Of Questions',array('class'=>'back'));

  // get Question details
  $data['query'] = $this->display_model->get_by_id($id)->row();

  // load view
  $this->load->view('display_question', $data);
}

Create a new view in your views folder called display_question.php and put this code in it:

Code:
<?php echo print_r($query); ?>

Test it works (you should have the contents of $query on the screen). Now modify the display_question view to make it a proper html page, displaying the data however makes sense to you.


Messages In This Thread
Pagination and table error. - by El Forum - 03-18-2013, 01:08 AM
Pagination and table error. - by El Forum - 03-18-2013, 01:09 AM
Pagination and table error. - by El Forum - 03-18-2013, 02:35 AM
Pagination and table error. - by El Forum - 03-18-2013, 03:14 AM
Pagination and table error. - by El Forum - 03-18-2013, 03:29 AM
Pagination and table error. - by El Forum - 03-18-2013, 03:49 AM
Pagination and table error. - by El Forum - 03-18-2013, 03:57 AM
Pagination and table error. - by El Forum - 03-18-2013, 04:17 AM



Theme © iAndrew 2016 - Forum software by © MyBB