So, I have installed codeigniter
in my VPS Ubuntu 16. When I want to login to mydomain/admin
, I enter my details. If I press login, I get the error below plus other members can't create accounts.
An uncaught Exception was encountered
Type: Error
Message: Call to a member function result() on boolean
Filename: /var/www/html/application/models/backend/dashboard/Dashboard_model.php
Line Number: 128
Backtrace:
File: /var/www/html/application/controllers/backend/dashboard/Home.php
Line: 27
Function: monthlyInvestment
File: /var/www/html/index.php
Line: 315
Function: require_once
My code at line 128:
return $query = $this->db->query("SELECT MONTHNAME(\`invest_date\`) as month, SUM(\`amount\`) as invest FROM \`investment\` GROUP BY YEAR(\`invest_date\`), MONTH(\`invest_date\`)")->result();
At line 27:
$data['monthlyInvestment'] = $this->dashboard_model->monthlyInvestment();
At line 315:
require_once BASEPATH.'core/CodeIgniter.php';