Public feed #379140

Anonymous

public text v1 · immutable
Raw Edit
·published 2007-03-03 00:15 UTC
rendered paste body
<?

/*
|==================================================================================
| FlexiBill
|---------------------------------
| by neen
| (c) 2007 FlexiBill LLC
|==================================================================================
*/

/*
| This is the Data Abstraction Layer library file
*/

class dal extends systemclass {
    function dal() {
        
        //print "<pre>".print_r($this->conf, 1)."</pre>";
        // load the proper database connection
        if($this->conf['database']['type'] == "postgres") {
            // do nothing, there is currently no postgres db connection
            // $this->db = $selected_db;
        }
        else {
            // require the mysql driver
            require_once(ROOT_PATH ."includes/lib/dbdrivers/db.mysql.php");
             // connect
            $this->db = new db_mysql;
            //$this->db->connect();
        }
    }
    // this function runs the query stored in $this->query
    // it can be called multiple times to allow the execution
    // of the same query more than once
    function runquery() {
        $this->result = mysql_query($this->query);
        return $this->result;    
    }
    function saverow() {
        $this->query = '';
        
        
    }
    
    
}

?>