public function assignVehicle($driver_id=null,$vehicle_id=null)
{
$sql = "UPDATE `drivers` SET `vehical_id`=$vehicle_id WHERE id=:driver_id";
$parameters = array(":driver_id"=>$driver_id);
Yii::app()->db->createCommand($sql)->execute($parameters);
}
public function insertCharges($area_id=null,$charge=null){
$sql = "insert into delivery_charge (`area_id`,`charge`) values (:area_id,:charge)";
$parameters = array(":area_id"=>$area_id,":charge"=>$charge);
Yii::app()->db->createCommand($sql)->execute($parameters);
}
$sql = "delete from `AuthItemChild` where parent=:parent AND child=:child";
$parameters = array(":parent"=>$parent,":child"=>$child);
Yii::app()->db->createCommand($sql)->execute($parameters);
{
$sql = "UPDATE `drivers` SET `vehical_id`=$vehicle_id WHERE id=:driver_id";
$parameters = array(":driver_id"=>$driver_id);
Yii::app()->db->createCommand($sql)->execute($parameters);
}
public function insertCharges($area_id=null,$charge=null){
$sql = "insert into delivery_charge (`area_id`,`charge`) values (:area_id,:charge)";
$parameters = array(":area_id"=>$area_id,":charge"=>$charge);
Yii::app()->db->createCommand($sql)->execute($parameters);
}
$sql = "delete from `AuthItemChild` where parent=:parent AND child=:child";
$parameters = array(":parent"=>$parent,":child"=>$child);
Yii::app()->db->createCommand($sql)->execute($parameters);
No comments:
Post a Comment