<?php
/**
 * Class that operate on table 'billname'. Database Mysql.
 *
 * @author: http://phpdao.com
 * @date: 2013-04-06 10:57
 */
class BillnameMySqlExtDAO extends BillnameMySqlDAO{
	
	public function queryAlllimted($start,$end){
		$sql = 'SELECT * FROM billname  order by billnameid desc limit '.$start.','.$end.'';
		$sqlQuery = new SqlQuery($sql);
		return $this->getList($sqlQuery);
	}


	
	public function queryAllForShow(){
		$sql = 'SELECT * FROM billname  order by billnameid desc';
		$sqlQuery = new SqlQuery($sql);
		return $this->getList($sqlQuery);
	}



		public function updatedel($billname){
		$sql = 'UPDATE billname SET  conditions = ?  WHERE billnameid = ?';
		$sqlQuery = new SqlQuery($sql);
		
		
		$sqlQuery->setNumber($billname->conditions);
	

		$sqlQuery->setNumber($billname->billnameid);
		return $this->executeUpdate($sqlQuery);
	}



	public function queryByType($type){
		$sql = 'SELECT * FROM billname WHERE conditions = 0 AND billtype = '.$type.'';
		$sqlQuery = new SqlQuery($sql);
		return $this->getList($sqlQuery);
	}


	
}
?>