user2201554
user2201554

Reputation:

CodeIgniter getting Value from Database to display

Error ----

Parse error: syntax error, unexpected T_RETURN in C:\wamp\www\jobsite\application\models\model_users.php on line 71

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

May I know how to fix it? thanks in advance.

Upvotes: 1

Views: 75

Answers (1)

Mudshark
Mudshark

Reputation: 3253

You're missing a semicolon here:

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

Upvotes: 1

Related Questions