JavaScript Required
We’re sorry, but Coda doesn’t work properly without JavaScript enabled.
public function getInterestRate($loan, $store_id) {
$sql = "SELECT interest_rate
FROM gold_interest_bands
WHERE value_from <= ?
AND value_to >= ?
AND store_id = ?";
$params = array("ddi",$loan,$loan,$store_id);
$res = $this->db->cleanQueryArr($sql,$params);
if($this->db->getLastnumrows() > 0) {
return $res[0]['interest_rate'];
} else {
return false;
}