Commit 0df082c3 by Jansa Jose

changes in webservice get vehicle model

parent 7a1742e9
...@@ -183,7 +183,6 @@ class Product extends CI_Controller { ...@@ -183,7 +183,6 @@ class Product extends CI_Controller {
$existingImages = (isset($_POST['existingImages']) && !empty($_POST['existingImages']))? $existingImages = (isset($_POST['existingImages']) && !empty($_POST['existingImages']))?
$_POST['existingImages']:''; $_POST['existingImages']:'';
unset($_POST['existingImages']); unset($_POST['existingImages']);
//pr($_POST);
$product = $this->Product_model->updateProduct(decode_param($product_id),$_POST); $product = $this->Product_model->updateProduct(decode_param($product_id),$_POST);
if($product){ if($product){
$evtMediaData = array(); $evtMediaData = array();
......
...@@ -1383,12 +1383,12 @@ class Webservice_model extends CI_Model { ...@@ -1383,12 +1383,12 @@ class Webservice_model extends CI_Model {
if(!isset($postData['vehiYear']) && empty($postData['vehiYear'])){ if(!isset($postData['vehiYear']) && empty($postData['vehiYear'])){
$respArr['message'] = 'Vehicle Year is Required' ; $respArr['message'] = 'Vehicle Year is Required' ;
} }
$year = (isset($postData['vehiYear']) && !empty($postData['vehiYear']))?$postData['vehiYear']:'';
$this->db->select("DISTINCT(VEHM.model_name) as model,VEHM.veh_model_id,VEH.engine,VEH.trim"); $this->db->select("DISTINCT(VEHM.model_name) as model,VEHM.veh_model_id,VEH.engine,VEH.trim");
$this->db->join('vehicle_models AS VEHM','VEHM.veh_model_id = VEH.model_id'); $this->db->join('vehicle_models AS VEHM','VEHM.veh_model_id = VEH.model_id');
$this->db->order_by('model'); $this->db->order_by('model');
$result = $this->db->get_where('vehicles AS VEH', $result = $this->db->get_where('vehicles AS VEH',
array('VEH.veh_brand_id'=>$postData['vehBrand_id'],'VEH.status'=>'1','VEH.year'=>$postData['vehiYear'])); array('VEH.veh_brand_id'=>$postData['vehBrand_id'],'VEH.status'=>'1','VEH.year'=>$year));
// pr($this->db->last_query());
if(empty($result) || empty($result = $result->result())){ if(empty($result) || empty($result = $result->result())){
$respArr['status'] = "error"; $respArr['status'] = "error";
return $respArr; return $respArr;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment