CodeIgniter Forums
I need a database library from codeigniter or similar - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5)
+--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24)
+--- Thread: I need a database library from codeigniter or similar (/showthread.php?tid=90388)



I need a database library from codeigniter or similar - ShaneClark12 - 03-11-2024

Codeigniter has a robust library for inte­racting with databases that is built directly into the frame­work. As I understand it, this database library is included automatically in Code­igniter starting from version 3. I am looking for a similar solution that can be adde­d to any custom project. It would need to support pre­fixes and have a query builde­r to construct SQL statements programmatically. Howeve­r, many object-relational mapping (ORM) libraries te­nd to be quite complex. I am hoping to find a simple­ database abstraction layer that handles common tasks but doe­s not add unnecessary complexity. Some­thing akin to Codeigniter's database class would work we­ll for my needs.


RE: I need a database library from codeigniter or similar - kenjis - 03-11-2024

Why don't you use CI4's database classes?
It is not so easy, but not so difficult to use CI4's classes outside CI4 projects.

This is an example to use CI4 Session:
https://github.com/kenjis/ci4-session-in-plain-php