ASISG
Gy - php framework/CMS | Documentation | How to add any database to gy
How to add any database to gy
gy php framework - does not use complex designs and database capabilities, so you can easily connect any database.
To do this, you need to create a class layer between gy and your database. Examples of this class:
- https://github.com/ssv32/gy/blob/master/gy/classes/Gy/Core/Db/MySql.php to work with mySQL
- https://github.com/ssv32/gy/blob/master/gy/classes/Gy/Core/Db/PhpFileSqlClientForGy.php to work with PhpFileSql
- https://github.com/ssv32/gy/blob/master/gy/classes/Gy/Core/Db/PgSql.php to work with PostgreSQL
Then implement all the methods following the example from these files.
Create a database in the database you need, and specify the necessary type and parameters for the connection in the configuration file.
After that, you need to set the data for the database script gy/install/installDataBaseTable.php Installation Examples:
The moment of creating the class object for working with the database is indicated here https://github.com/ssv32/gy/blob/master/gy/gy.php