public function insertBrand(&$db)
 {
     $model = "Brand";
     //dump(I('post.new_corp'));
     //dump(string_check(I('post.new_corp')));
     $rs = insertorselect($model, $db->brand_id, I('post.new_brand'));
     if (!$rs) {
         $this->error($model . "数据插入出错");
         die;
     } else {
         $db->brand = $rs['value'];
         $db->brand_id = $rs['id'];
     }
 }
Ejemplo n.º 2
0
 public function insertFatherLayer(&$db)
 {
     $model = $this->_table;
     $rs = insertorselect($model, $db->father_id, I('post.new_father'));
     if (!$rs) {
         $this->error($model . "数据插入出错");
         die;
     } else {
         $db->father_id = $rs['id'];
     }
 }
Ejemplo n.º 3
0
 public function insertcategory(&$db)
 {
     $model = "Category";
     $rs = insertorselect($model, $db->category_id, I('post.new_ctgr'));
     if (!$rs) {
         $this->error($model . "数据插入出错");
         // die();
     } else {
         $db->category = $rs['value'];
         $db->category_id = $rs['id'];
     }
 }