<?php

    require_once('config.php');
    require_once(LIB_PATH.DS.'adodb5/adodb.inc.php');
    class db
    {

        function __construct(){
            $db = NewADOConnection('mysql');
            $db->Connect(DB_SERVER, DB_USER , DB_PASS, DB_NAME);
            $db->SetFetchMode(ADODB_FETCH_ASSOC);

            $db->Execute("SET NAMES utf8");
			$db->Execute("SET CHARACTER_SET utf8");

            $GLOBALS['GRIND_CONFIG']['DATABASE']['conObj'] = $db;
            if(! $GLOBALS['GRIND_CONFIG']['DATABASE']['conObj'])
                die("could't connect to SQL");
            $this->adodb = $db;
        
            $this->adodb->debug = DEBUG;
        }
 



        public function disconnect()
        {
            //  mysql_close();
        }
    }
			