Ejemplo n.º 1
0
 public function delete()
 {
     $model = M("Arctype");
     $id = $_REQUEST["id"];
     if (isset($id)) {
         deleteJG2($id);
         $this->success('删除成功!');
     }
 }
Ejemplo n.º 2
0
function deleteJG2($id = 0)
{
    $jg = M("Arctype");
    $voList = $jg->where("reid=" . $id)->field("id")->select();
    foreach ($voList as $value) {
        deleteJG2($value["id"]);
        $jg->where("id=" . $value["id"])->delete();
    }
    $jg->where("id=" . $id)->delete();
}