<?php

/**
 * Class that operate on table 'billtemplate'. Database Mysql.
 *
 * @author: http://phpdao.com
 * @date: 2022-05-25 03:14
 */
class BilltemplateMySqlExtDAO extends BilltemplateMySqlDAO {

    public function insertWithId($billtemplate, $id) {
        $sql = 'INSERT INTO billtemplate (id,name, userid, sysdate, del) VALUES (?,?, ?, ?, ?)';
        $sqlQuery = new SqlQuery($sql);

        $sqlQuery->setNumber($id);
        $sqlQuery->set($billtemplate->name);
        $sqlQuery->setNumber($billtemplate->userid);
        $sqlQuery->set($billtemplate->sysdate);
        $sqlQuery->setNumber($billtemplate->del);

        $id = $this->executeInsert($sqlQuery);
        $billtemplate->id = $id;
        return $id;
    }

}

?>