<?php
/**
 * Class that operate on table 'paymentnetworks'. Database Mysql.
 *
 * @author: http://phpdao.com
 * @date: 2016-06-21 11:00
 */
class PaymentnetworksMySqlExtDAO extends PaymentnetworksMySqlDAO{

	public function queryByNameAndNotId($networkName, $networkId, $colName) {
        $sql = "select *  from paymentnetworks where $colName = ? and id != ?";
        $sqlQuery = new SqlQuery($sql);
        $sqlQuery->set($networkName);
        $sqlQuery->setNumber($networkId);
        return $this->getList($sqlQuery);
    }

    public function queryByColName($networkName, $colName) {
        $sql = "SELECT * FROM paymentnetworks WHERE $colName = ?";
        $sqlQuery = new SqlQuery($sql);
        $sqlQuery->set($networkName);
        return $this->getList($sqlQuery);
    }

}
?>