This is code from invision powerboard:
//--------------------------------
// Load the DB driver and such
//--------------------------------
$INFO['sql_driver'] = !$INFO['sql_driver'] ? 'mySQL' : $INFO['sql_driver'];
$to_require = ROOT_PATH."sources/Drivers/".$INFO['sql_driver'].".php";
require ($to_require);
$DB = new db_driver;
$DB->obj['sql_database'] = $INFO['sql_database'];
$DB->obj['sql_user'] = $INFO['sql_user'];
$DB->obj['sql_pass'] = $INFO['sql_pass'];
$DB->obj['sql_host'] = $INFO['sql_host'];
$DB->obj['sql_tbl_prefix'] = $INFO['sql_tbl_prefix'];
$DB->obj['debug'] = ($INFO['sql_debug'] == 1) ? $_GET['debug'] : 0;
// Get a DB connection
$DB->connect();
and once it does that in an include file or something you can do SQL queries w/ ease. like:
$DB->query("SELECT id, name, mgroup, password, ip_address FROM ibf_members WHERE LOWER(name)='$username'");
my question is:
What is that db_driver?
and what on earth does this line do:
$INFO['sql_driver'] = !$INFO['sql_driver'] ? 'mySQL' : $INFO['sql_driver'];
im trying to get my own class setup to do sql queries, but im not sure whats required and whats not? Can anyone help me make a class like this?