28 lines
709 B
Plaintext
28 lines
709 B
Plaintext
// 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);
|
|
}
|
|
} |