Esempio n. 1
0
function deleteBranch($pid)
{
    $s_sql = "Select item_id from tree where item_parent_id={$pid}";
    $res = mysql_query($s_sql);
    if ($res) {
        while ($row = mysql_fetch_array($res)) {
            deleteBranch($row['item_id']);
            deleteSingleNode($row['item_id']);
        }
    }
}
function deleteBranch($pid)
{
    $s_sql = "Select item_id,item_order from samples_tree where item_parent_id={$pid}  and GUID='" . $_SESSION["id"] . "'";
    $res = mysql_query($s_sql);
    if ($res) {
        while ($row = mysql_fetch_array($res)) {
            deleteBranch($row['item_id']);
            deleteSingleNode($row['item_id']);
        }
    }
}