clean code

This commit is contained in:
David Drapeau 2020-11-30 05:33:47 +01:00
parent ade2a742f2
commit a0a4d16189

View File

@ -1,22 +0,0 @@
<?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;
}
}