<?php
class ClassERP {
  public function __construct(){}
  public function __destruct(){}
  
    public function getConfig(){
        $oPDOLink = ClassConfig::databaseConnect();
        $rowsConfig = array();
        $sql="
        SELECT *
        FROM erp_config
        WHERE is_active=TRUE
        ";
        $execSQL = $oPDOLink->prepare($sql);
        $execSQL->execute(array());
        $rows = $execSQL->fetchAll(PDO::FETCH_ASSOC);
        foreach($rows as $k=>$v){
            $erpConfig[$rows[$k]['k']] = $rows[$k]['v'];
        }
        return $erpConfig;
    }
}
