<?php
/**
 * Class that operate on table 'productcatunit'. Database Mysql.
 *
 * @author: http://phpdao.com
 * @date: 2013-10-22 14:58
 */
class ProductcatunitMySqlExtDAO extends ProductcatunitMySqlDAO{

	public function queryByProductCatidExt($value){
		$sql = 'SELECT * FROM productcatunit WHERE productcatid = ? AND conditions = 0' ;
		$sqlQuery = new SqlQuery($sql);
		$sqlQuery->setNumber($value);
		return $this->getList($sqlQuery);
	}


	public function queryByProductid($value){
		$sql = 'SELECT * 
		FROM productcatunit
		JOIN product
		ON product.productCatId =  productcatunit.productcatid
		WHERE productcatunit.productcatid = ? AND productcatunit.conditions = 0' ;
		$sqlQuery = new SqlQuery($sql);
		$sqlQuery->setNumber($value);
		return $this->getList($sqlQuery);
	}


}
?>