policybot/application/controllers/new 2.txt

28 lines
709 B
Plaintext
Raw Normal View History

2021-11-30 10:56:55 +00:00
// compare details
foreach($comparefields as $ke=>$val)
{
$tblname="category_compare_master";
if (is_numeric($comparefields[$ke])){
$cid = $comparefields[$ke];
}
else{
$values=array('compare_name'=>ucwords($comparefields[$ke]),
'status'=>1);
if($comparefields[$ke]!="") {
$result=$this->commonsql_model->insert_table($tblname,$values);
}
$cid = $this->db->insert_id();
}
$tblnames="category_compare_detail";
$value=array(
'category'=>$catid,
'compare'=>$cid ,
'status'=>1);
if($catid!="" && $cid!="") {
$result=$this->commonsql_model->insert_table($tblnames,$value);
}
}