0byt3m1n1
Path:
C:
/
wamp64
/
www
/
cpms_new
/
model
/
[
Home
]
File: defaultValues2_mdl.php
<?php require_once "../lib/config.php"; require_once BASE_DIR."/lib/db/DBConnection.php"; class DefaultValues { public function getDefaultValues() { $result=array(); $c=array(); $con= DBConnection::getConnect(); if(!isset($con)) { return null; } try { $sql = "SELECT * FROM default"; $stmt = $con->prepare($sql); $stmt->execute(); $stmt->bind_result($hpl, $lws); while ($stmt->fetch()) { foreach($row as $key => $val) { $c[$key] = $val; } $result[] = $c; } $stmt->close(); $con->close(); return $result; } catch( Exception $ex) { echo "DefaultValues::getDefaultValues() ->". $ex-> getMessage(); return null; } } } ?>