<?php
/**
 * Class that operate on table 'premium_installments'. Database Mysql.
 *
 * @author: http://phpdao.com
 * @date: 2020-04-25 01:34
 */
class PremiumInstallmentsMySqlExtDAO extends PremiumInstallmentsMySqlDAO{

    public function getpremiumautodatabyid($id) {

        $sql = 'SELECT premiuminstallments.*,premiumautomatic.client_id as clientid FROM `premiuminstallments` 
                join premiumautomatic on premiumautomatic.id = premiuminstallments.premiumauo_id 
                WHERE premiuminstallments.id_installment = '.$id;
        $sqlQuery = new SqlQuery($sql);
//        print_r($sql.'<br>');
        return $this->getRow($sqlQuery);
    }


}
?>