Welcome Guest, Not a member yet? Register   Sign In

[eluser]barun the michael[/eluser]
My myart_model is inside the models folder but though I am getting error like this Fatal error: Class 'Myart_model' not found in C:\wamp\www\CodeIgniter_1.6.3\CodeIgniter_1.6.3\system\libraries\Loader.php on line 177 Please help me.........

Double check all the spelling and capital/small cases in you file-name/class-name/ and loadings.

refering to user manual you can find this :
Quote:Where Model_name is the name of your class. Class names must have the first letter capitalized with the rest of the name lowercase. Make sure your class extends the base Model class.

The file name will be a lower case version of your class name.
It's from CI 1.7 though, you should check your corresponding version's manual/

[eluser]barun the michael[/eluser]

I am using codeigniter version 1.6.3 and my model name is myart_model and writing class like this class Myart_model extends Model {

function Myart_model()
function get_MyartData()
$sql = "SELECT * FROM users ";

$query = $this->db->query($sql);

//echo $query->num_rows();
//echo $str = $this->db->last_query();
if ($query->num_rows() > 0)
$result = array();
foreach ($query->result_array() as $row)
return $result;
return false;

This is my model code and its name is myart_mode.php

Here is my controller code
class Myart extends Controller
var $error_string = "";
function Myart()
function index()
$data['myart'] = array();
$data['error_string'] = $this->error_string;
$data['myart'] = $this->myart_model->get_MyartData();



//$header['title'] = 'Welcome to Myart4Home';


$this->load->view('myart_view', $data);



[eluser]Colin Williams[/eluser]
Quote:This is my model code and its name is myart_mode.php

Perhaps an 'l' is needed: myart_model.php

Theme © iAndrew 2016 - Forum software by © MyBB