CodeIgniter从数据库中获取值以显示

时间:2013-04-09 07:45:23

标签: codeigniter

错误 ----

解析错误:语法错误,第71行的C:\ wamp \ www \ jobsite \ application \ models \ model_users.php中的意外T_RETURN

public function profile_data()
{
    $this->load->database();
    $query = $this->db->get('tbl_studentreg')  //tbl_studentreg is the table name
    return $query->result();                   // Line 71
}

我可以知道如何修复它吗?提前谢谢。

1 个答案:

答案 0 :(得分:1)

你错过了一个分号:

$query = $this->db->get('tbl_studentreg'); //semicolon added
相关问题