PD MODIFIED5

This commit is contained in:
velz 2018-10-03 18:27:17 +05:30
parent 027e066f12
commit d0e95de3f7
4 changed files with 26 additions and 5 deletions

View File

@ -86,7 +86,7 @@ defined('EXIT__AUTO_MAX') OR define('EXIT__AUTO_MAX', 125); // highest auto
// define login route name for token verification
//defined('ROUTE_LOGIN') OR define('ROUTE_LOGIN', '(listLessPDDetails/:any)'); // no errors
defined('ROUTE_LOGIN') OR define('ROUTE_LOGIN', 'getListOfLenders'); // no errors
defined('ROUTE_LOGIN') OR define('ROUTE_LOGIN', 'getListOfProducts'); // no errors
/*********************AWS resources Constants*************************************************/
defined('PROFILE_PICTURE_BUCKET_NAME') OR define('PROFILE_PICTURE_BUCKET_NAME','sineedgedevprofilepic');

View File

@ -149,7 +149,8 @@ class PD_Controller extends REST_Controller {
$fields = array('city_id','name as city_name');
$where_condition_array = array('isactive' => 1,'fk_state_id' => $state['state_id']);
$cities = $this->PD_Model->selectCustomRecords($fields,$where_condition_array,CITY);
array_push($result_data[$key],$cities);
//array_push($result_data[$key],$cities);
$result_data[$key]['cities'] = $cities;
}
$data['dataStatus'] = true;

View File

@ -21,7 +21,7 @@ class AWS_S3
//echo "listAllBuckets";
$this->S3 = S3Client::factory($this->s3_properties);
//$this->getAllObjectsInaBucket();
// $this->deleteSingleObjFromBucket();
}
@ -107,7 +107,7 @@ class AWS_S3
}
// Get List of objetcs as byte(Raw file).
public function getAllObjectsInaBucket($bucket_name,$folder_name)
{
$objects = array();
@ -131,6 +131,19 @@ class AWS_S3
}
// Delete an object from the bucket.
public function deleteSingleObjFromBucket($bucket,$key)
{
$result = $this->S3->deleteObject([
'Bucket' => $bucket,
'Key' => $key
]);
return $result;
}
}

View File

@ -92,7 +92,7 @@ class SPARQ_Model extends CI_Model {
}
public function getJoinRecords($columns,$table,$joins,$print_query = '')
public function getJoinRecords($columns,$table,$joins,$where_condition_array = array(),$print_query = '')
{
@ -104,6 +104,13 @@ class SPARQ_Model extends CI_Model {
$this->db->join($join['table'], $join['condition'], $join['jointype']);
}
}
if(count($where_condition_array))
{
foreach($where_condition_array as $key => $condition)
{
$this->db->WHERE($key,$condition);
}
}
$data = $this->db->get()->result_array();