[eluser]oldrock[/eluser]
Hello Guys,
Im new with CI and i got little problem here. I've read the posts with the same error msg but i couldn't figure out whats the problem.
CODE:
Controller:
function add_player_details()
{
$this->load->model('admin_tool/addplayermodel');
$data['teams']=$this->addplayermodel->select_teams();
echo $data['teams'];
$this->load->helper(array('url','form'));
$this->load->view('admin-tool/add_player',$data);
}
Model:
function select_teams()
{
$query = $this->db->query("SELECT team FROM team");
if($query)
{
return $query;
}
else
{
return mysql_error();
}
}
And i get this error:
Severity: 4096
Message: Object of class CI_DB_mysql_result could not be converted to string
Filename: admin-tool1/login.php
Line Number: 68
Thanks in advance