BabelKit PHP Handle Creationnew BabelKit()require_once('BabelKit.php'); $babelkit = new BabelKit($dbh, array( 'table' => 'bk_code' )): The new BabelKit() method returns a new BabelKit handle object. $dbh must be either a PEAR DB or a phplib database handle. The optional 'table' parameter can be used to specify which of several code tables to use. The default is 'bk_code'. Using PEAR DBHere is an example of how to use the PEAR DB library. If you already have a PEAR DB handle open, just pass it into BabelKit.require_once('DB.php'); $pear_dbh = DB::connect("mysql://webbysoft:124c41@localhost/webbysoft"); if (DB::iserror($pear_dbh)) { die($pear_dbh->getMessage()); } require_once('BabelKit.php'); $babelkit = new BabelKit($pear_dbh); Using phplibHere is an example of how to use the phplib library. If you already have a phplib handle open, just pass it into BabelKit.require_once('/usr/lib/phplib/db_mysql.inc'); $phplib_dbh = new DB_Sql; $phplib_dbh->Host = 'localhost'; $phplib_dbh->Database = 'webbysoft'; $phplib_dbh->User = 'webbysoft'; $phplib_dbh->Password = '124c41'; require_once('BabelKit.php'); $babelkit = new BabelKit($phplib_dbh); |