rendered paste body $query = mysql_query("DELETE FROM ".$glob['dbprefix']."CubeCart_inventory WHERE productId='".$key."' ") or die("Error: " . mysql_error()); $query1 = mysql_query("DELETE FROM ".$glob['dbprefix']."CubeCart_cats_idx WHERE productId='".$key."' ") or die("Error: " . mysql_error()); $findCat = mysql_query("SELECT cat_id from ".$glob['dbprefix']."CubeCart_cats_idx where productId ='".$key."' ") or die("Error: " . mysql_error()); $catid = mysql_result($findCat, 0); echo '<h1>'.$catid.'</h1>'; $query = mysql_query("update ".$glob['dbprefix']."CubeCart_category set `noProducts` = (`noProducts`-1) where `cat_id` = '".$catid."' ") or die('Error: '.mysql_error());