public void deleteCatalog(String FatherID){ int tempData=0; sql="select fatherID,linkstr,AncestorID from catalog where productID="+FatherID; rs=conn.execute(sql); try{ if(rs.next()){ tempData=rs.getInt("fatherID"); LinkStr=rs.getString("linkstr"); AncestorID=rs.getString("AncestorID"); }
try{rs.close();} catch(Exception e){ System.out.println(e); } sql="delete from catalog where ProductID="+FatherID; // out.println(sql); try{ conn.execute(sql); }catch(Exception e){ System.out.println(e); } sql="delete from catalog where linkstr like ′′"+LinkStr+"%′′ and AncestorID="+AncestorID; //out.println(sql); try{ conn.execute(sql); }catch(Exception e){ System.out.println(e); } sql="update catalog set ChildNum=ChildNum-1 where productID="+tempData; //out.println(sql); try{ conn.execute(sql); }catch(Exception e){ System.out.println(e); } }catch(Exception e){ System.out.println(e); } } //end public
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn