Welcome Guest, Not a member yet? Register   Sign In
removing index.php from url and load model eror
#3

[eluser]arif[/eluser]
[quote author="InsiteFX" date="1309625762"]Error 500 is a server error not a CI Error!

Unless you have some bad code in your Model hard to say because you did not show the code for it!

InsiteFX[/quote]

sorry for that now this the code

Code:
<?php
class Blog extends CI_Controller{
    //put your code here
    function __construct() {
        parent::__construct();
        $this->load->model('blog');
      
    }
    function index() {
        

  $data['query']= $this->blog->index();
  
        
   $this->load->view('blog_view', $data);
    }
  
}

and the model
Code:
<?php
class Blog extends CI_Model {
    
     function index(){
      $this->db->select('id,title,body');
                $this->db->from('blogs');
          
                $this->db->order_by('id','ASC');
                $query = $this->db->get();

                return $query;
}
  
}


Messages In This Thread
removing index.php from url and load model eror - by El Forum - 07-02-2011, 03:29 AM
removing index.php from url and load model eror - by El Forum - 07-02-2011, 05:56 AM
removing index.php from url and load model eror - by El Forum - 07-02-2011, 06:36 AM
removing index.php from url and load model eror - by El Forum - 07-02-2011, 07:47 AM
removing index.php from url and load model eror - by El Forum - 07-10-2011, 09:17 AM
removing index.php from url and load model eror - by El Forum - 07-10-2011, 11:17 AM



Theme © iAndrew 2016 - Forum software by © MyBB