Welcome Guest, Not a member yet? Register   Sign In
How to load DB_froge class inside my own driver?
#2

I'm assuming data_driver is a database driver. In most cases, when building a new database driver I would recommend looking at the MySQLi driver as a reference. Each driver is structured as a directory with the base driver name, followed by a series of files to support the various portions of the database library/libraries, so the file/directory structure looks something like this:
/system/database/drivers/{driver_name}/
{driver_name}_driver.php
{driver_name}_forge.php
{driver_name}_result.php
{driver_name}_utility.php

It gets a little more complicated for drivers like PDO, which have their own subdrivers.

When you load DB_forge, it gets the driver information from the database library, then loads a file from /system/database/drivers/{driver_name}/{driver_name}_forge.php to tell it how DB_forge is going to interact with the underlying database. If this file doesn't exist, you can't use DB_forge for the current driver.
Reply


Messages In This Thread
RE: How to load DB_froge class inside my own driver? - by mwhitney - 09-14-2015, 07:46 AM



Theme © iAndrew 2016 - Forum software by © MyBB