Welcome Guest, Not a member yet? Register   Sign In
Using the Active Record library as a standalone
#4

[eluser]xwero[/eluser]
The library structure is not that good because the main file, DB.php, is stored in the database directory. The directory should be to store every file except the main file then you can load the library as follows
Code:
include('libraries/DB.php');
instead of
Code:
include('libraries/database/DB.php');

Another thing you have to strip from CI is the application/config/database.php file. The inclusion of this file should be altered too.

To make method calls you do
Code:
$db = new CI_DB();
$db->query('sql statement here');


Messages In This Thread
Using the Active Record library as a standalone - by El Forum - 01-02-2009, 08:53 AM
Using the Active Record library as a standalone - by El Forum - 01-02-2009, 09:03 AM
Using the Active Record library as a standalone - by El Forum - 01-02-2009, 09:26 AM
Using the Active Record library as a standalone - by El Forum - 01-02-2009, 10:11 AM
Using the Active Record library as a standalone - by El Forum - 01-02-2009, 10:23 AM
Using the Active Record library as a standalone - by El Forum - 01-02-2009, 11:21 AM
Using the Active Record library as a standalone - by El Forum - 01-02-2009, 05:55 PM
Using the Active Record library as a standalone - by El Forum - 01-02-2009, 06:22 PM
Using the Active Record library as a standalone - by El Forum - 01-02-2009, 06:39 PM
Using the Active Record library as a standalone - by El Forum - 01-02-2009, 07:06 PM
Using the Active Record library as a standalone - by El Forum - 01-02-2009, 08:04 PM
Using the Active Record library as a standalone - by El Forum - 01-02-2009, 08:08 PM
Using the Active Record library as a standalone - by El Forum - 01-02-2009, 09:25 PM
Using the Active Record library as a standalone - by El Forum - 01-02-2009, 10:17 PM
Using the Active Record library as a standalone - by El Forum - 01-02-2009, 10:41 PM
Using the Active Record library as a standalone - by El Forum - 06-07-2010, 03:30 PM
Using the Active Record library as a standalone - by El Forum - 03-09-2012, 04:42 PM
Using the Active Record library as a standalone - by El Forum - 01-18-2013, 05:16 AM



Theme © iAndrew 2016 - Forum software by © MyBB