CodeIgniter\Database\Exceptions\DatabaseException #8 You must set the database table |
I am getting the following error in a newly created project. I have created database connection in APP/CONFIG/DATABASE.PHP. I have another project installed and running with out any issues. I am not sure what happened with this project.
Code: CodeIgniter\Database\Exceptions\DatabaseException #8
If you need to change the table you do it like this.
PHP Code: $db = \Config\Database::connect(); What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
This errors show when you create model extends Model and you use builder, so in your model, you have to set $this->table = 'tableName';
Learning CI4 from my works, from errors and how to fix bugs in the community Love CI & Thanks CI Teams |
Welcome Guest, Not a member yet? Register Sign In |