<?php
/**
 * Class that operate on table 'producttempunit'. Database Mysql.
 *
 * @author: http://phpdao.com
 * @date: 2013-05-07 12:40
 */
class ProducttempunitMySqlExtDAO extends ProducttempunitMySqlDAO{
	
	public function queryWithProductTempIdAndCondition($producttempid)
	{
		$sql = 'SELECT producttempunit.*, unit.unitName 
		 FROM producttempunit JOIN unit 
		 ON producttempunit.unitid = unit.unitId 
		 where producttempunit.producttempid = '.$producttempid.' and unit.conditions = 0 
		  and producttempunit.conditions = 0';
		$sqlQuery = new SqlQuery($sql);
		//print($sql);
		return $this->getList($sqlQuery);
	}

	
}
?>