ccrevcypsys Posted August 17, 2007 Share Posted August 17, 2007 This just isnt working and i really cant figure it out. I really need to fix it so can somone help me please if(isset($_GET['delete']) && $_GET["delete"]>0){ // delete product $where = "productId=".$db->mySQLSafe($_GET["delete"]); $delete = $db->delete($glob['dbprefix']."CubeCart_inventory", $where); // set categories -1 $cats = $db->select("SELECT cat_id FROM ".$glob['dbprefix']."CubeCart_cats_idx WHERE productId=".$db->mySQLSafe($_GET["delete"])); if($cats==TRUE){ for($i=0;$i<count($cats);$i++){ $db->categoryNos($cats[$i]['cat_id'], "-"); } } // delete category index $where = "productId=".$db->mySQLSafe($_GET["delete"]); $deleteIdx = $db->delete($glob['dbprefix']."CubeCart_cats_idx", $where); unset($record); // delete product options $record['product'] = $db->mySQLSafe($_GET["delete"]); $where = "product=".$db->mySQLSafe($_GET["delete"]); $deleteOps = $db->delete($glob['dbprefix']."CubeCart_options_bot", $where); unset($record); if($delete == TRUE){ $msg = "<p class='infoText'>".$lang['admin']['products']['delete_success']."</p>"; } else { $msg = "<p class='warnText'>".$lang['admin']['products']['delete_fail']."</p>"; } } $artist_console->assign("PRODUCT_ID",$products[$i]['productId']); $artist_console->assign("CAT_ID",$results[$i]['cat_id']); Quote Link to comment https://forums.phpfreaks.com/topic/65495-solved-delete-data-help/ Share on other sites More sharing options...
wildteen88 Posted August 17, 2007 Share Posted August 17, 2007 Whats not working? Need to post more information, like what's your script supposed to do, what's is it doing now. Post any errors you are getting etc. Quote Link to comment https://forums.phpfreaks.com/topic/65495-solved-delete-data-help/#findComment-327050 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.