CI4 where should I connect to DB? |
@imabot: If that's in the model? For the primary database? If so, you need to configure your model first:
https://codeigniter.com/user_guide/model...your-model You don't need to use $this->table. You just do: Code: $this->orderBy('id', 'DESC'); |
Messages In This Thread |
CI4 where should I connect to DB? - by imabot - 05-07-2020, 11:32 PM
RE: CI4 where should I connect to DB? - by php_rocs - 05-07-2020, 11:46 PM
RE: CI4 where should I connect to DB? - by InsiteFX - 05-08-2020, 04:04 AM
RE: CI4 where should I connect to DB? - by jreklund - 05-08-2020, 08:25 AM
RE: CI4 where should I connect to DB? - by imabot - 05-09-2020, 10:49 PM
RE: CI4 where should I connect to DB? - by jreklund - 05-10-2020, 02:02 AM
RE: CI4 where should I connect to DB? - by imabot - 05-10-2020, 05:46 AM
RE: CI4 where should I connect to DB? - by InsiteFX - 05-10-2020, 06:57 AM
RE: CI4 where should I connect to DB? - by jreklund - 05-10-2020, 08:47 AM
RE: CI4 where should I connect to DB? - by imabot - 05-11-2020, 09:06 AM
|