Cdb Command

This is my action in controller


public function actionQwer($product,$end){

		$stock=Stock::model()->findByAttributes(array('productId'=>$product),array('order'=>'date DESC'));		

		$start=$stock->date;		

		$criteriaDelivery=new CDbCriteria;		

		$criteriaDelivery->addBetweenCondition('date',$start,$end);

		$criteriaDelivery->with=array('deliveryorderproducts');

		$criteriaDelivery->together = true;

		$criteriaDelivery->condition = "deliveryorderproducts.productId=:product";

		$criteriaDelivery->params = array(':product' => $product);

		$delivery=Deliveryorder::model()->findAll($criteriaDelivery);

		$this->json_encode_with_relations($delivery,'date,deliveryorderproducts');

	}

AND this is my response


[{"date":"2013-12-10","deliveryorderproducts":[{"id":"1","deliveryOrderId":"1","productId":"53","numberOfItems":"10","cost":"130","flag":"1","carton":"1"}]},{"date":"2013-12-07","deliveryorderproducts":[{"id":"37","deliveryOrderId":"4","productId":"53","numberOfItems":"3","cost":"39","flag":"1","carton":"1"}]}]



for this request http://localhost/kumar/index.php/reports/qwer?end=2013-12-09&product=53

as per the code i must not get the entry dated on 2013-12-10.