trim() added : ps
This commit is contained in:
parent
f7bd073494
commit
540c8022ca
@ -123,22 +123,22 @@ class Data_Dump_Model extends SPARQ_Model {
|
||||
|
||||
public function getId($flag,$keyword){
|
||||
// echo "flag".$flag;
|
||||
$value = str_replace(" ", "",$keyword);
|
||||
if($flag == 1){
|
||||
// "entity_id": "16",
|
||||
// "full_name": "Clix Capital Services Private Limited",
|
||||
// "short_name": "CLIX",
|
||||
$select = "entity_id";$table = "m_entity";$where = "short_name";}
|
||||
if($flag == 2){$select = "product_id"; $table = "m_products"; $where = "abbr";}
|
||||
if($flag == 3){$value = $keyword;
|
||||
$select = "subproduct_id"; $table = "m_subproducts"; $where = "abbr";}
|
||||
if($flag == 4){$select = "customer_segment_id"; $table = "m_customer_segment"; $where = "abbr";}
|
||||
if($flag ==5 ){$value = $keyword;
|
||||
$select = "state_id"; $table = "m_states"; $where = "name";}
|
||||
if($flag ==6 ){$select = "pincode_id";$where = "pincode";$table = "m_pincode";}
|
||||
if($flag ==7 ){$value = $keyword;
|
||||
$select = "city_id";$where = "name";$table = "m_city";}
|
||||
if($flag ==8 ){$select = "userid";$where = "first_name";$table = "m_user_profile";}
|
||||
if($flag == 1){ $value = trim($keyword); $value = strtolower($value);
|
||||
$select = "entity_id";$table = "m_entity";$where = "short_name";}
|
||||
if($flag == 2){ $value = rtrim($keyword," ");$value = ltrim($value," "); $value = strtolower($value);
|
||||
$select = "product_id"; $table = "m_products"; $where = "abbr";}
|
||||
if($flag == 3){ $value = rtrim($keyword," ");$value = ltrim($value," "); $value = strtolower($value);
|
||||
$select = "subproduct_id"; $table = "m_subproducts"; $where = "abbr";}
|
||||
if($flag == 4){ $value = trim($keyword);$value = strtolower($value);
|
||||
$select = "customer_segment_id"; $table = "m_customer_segment"; $where = "abbr";}
|
||||
if($flag == 5){ $value = rtrim($keyword," ");$value = ltrim($value," "); $value = strtolower($value);
|
||||
$select = "state_id"; $table = "m_states"; $where = "name";}
|
||||
if($flag == 6){ $value = trim($keyword); $value = strtolower($value);
|
||||
$select = "pincode_id";$where = "pincode";$table = "m_pincode";}
|
||||
if($flag == 7){ $value = rtrim($keyword," ");$value = ltrim($value," "); $value = strtolower($value);
|
||||
$select = "city_id";$where = "name";$table = "m_city";}
|
||||
if($flag == 8){ $value = trim($keyword);$value = strtolower($value);
|
||||
$select = "userid";$where = "first_name";$table = "m_user_profile";}
|
||||
|
||||
$this->db->select($select);
|
||||
$this->db->from($table);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user