Source for file adodb.php

Documentation is available at adodb.php


1 <?php
2 /**
3 * @author Jan H. Andersen <jha@ipwsystems.dk>
4 * @author Martin R. Larsen <mrl@ipwsystems.dk>
5 * @copyright {@link http://www.ipwsystems.dk/ IPW Systems a.s}
6 * @license http://opensource.org/licenses/gpl-license.php GNU Public License
7 * @package METAjour
8 * @subpackage handler
9 * $Id: adodb.php,v 1.5 2004/11/16 09:59:59 SYSTEM Exp $
10 */
11 require_once('core/ado/adodb.inc.php');
12
13 function &getdbconn() {
14 global $CONFIG
15 if (!isset($CONFIG['sql_type'])) $CONFIG['sql_type'] = 'mysql';
16 static $_dbhandler = null;
17 if (null == $_dbhandler) {
18 /* DO NOT USE ASSIGN BY REF HERE AS
19 * STATIC IS IMPLEMENTED IN PHP AS REFERENCES
20 * THEREFOR AN ASSIGN BY REF HERE WOULD
21 * DESTROY THE "STATICNESS" OF $_DBHANDLER
22 */
23 $_dbhandler = ADONewConnection('mysql');
24 $_dbhandler->connect($CONFIG['sql_host'], $CONFIG['sql_user'], $CONFIG['sql_password'], $CONFIG['sql_database']);
25 $_dbhandler->SetFetchMode(ADODB_FETCH_ASSOC);
26 }
27 return $_dbhandler;
28 }
29 ?>

Documentation generated on Thu, 9 Jun 2005 06:50:46 +0200 by phpDocumentor 1.2.3