r1234: Let's get rid of some SQL errors, mmk?
authorRobert Sesek <rsesek@bluestatic.org>
Wed, 4 Oct 2006 23:37:35 +0000 (23:37 +0000)
committerRobert Sesek <rsesek@bluestatic.org>
Wed, 4 Oct 2006 23:37:35 +0000 (23:37 +0000)
admin/product.php
docs/changes.txt

index 1abeb746f5e7390b8a18348b714554649edb2ac6..703fc80c3970f2e6e21b067894a996646bbd0f72 100755 (executable)
@@ -83,7 +83,7 @@ if ($_REQUEST['do'] == 'killversion')
 {
        $bugsys->input_clean('versionid', TYPE_UINT);
        $db->query("DELETE FROM " . TABLE_PREFIX . "version WHERE versionid = " . $bugsys->in['versionid']);
-       $db->query("DELETE FROM " . TABLE_PREFIX . "bug WHERE versionid = " . $bugsys->in['versionid']);
+       $db->query("DELETE FROM " . TABLE_PREFIX . "bug WHERE version = " . $bugsys->in['versionid']);
        
        build_versions();
        
@@ -194,7 +194,7 @@ if ($_REQUEST['do'] == 'killproduct')
        
        $db->query("DELETE FROM " . TABLE_PREFIX . "product WHERE productid IN (" . implode(', ', $list) . ")");
        $db->query("DELETE FROM " . TABLE_PREFIX . "version WHERE productid IN (" . implode(', ', $list) . ")");
-       $db->query("DELETE FROM " . TABLE_PREFIX . "bug WHERE productid IN (" . implode(', ', $list) . ")");
+       $db->query("DELETE FROM " . TABLE_PREFIX . "bug WHERE product IN (" . implode(', ', $list) . ")");
        
        build_products();
        
index e7b75aedf240af0c71735435f12aa2d04eef235c..3e45cd78dc22a623aae7f7c84e9eaa1b0cea545a 100644 (file)
@@ -5,6 +5,7 @@
 - Use the correct language variable key for exporting the XML encoding in syndicate.php
 - API-level errors are not caught in the registration process before insertion because of user_cumulative [register.php]
 - Remove warnings on explain.php?do=products (http://www.bluestatic.org/bugs/showreport.php?bugid=29)
+- Removed SQL errors when deleting a product or version due to bad column names (http://www.bluestatic.org/bugs/showreport.php?bugid=28) [admin/product.php]
 
 1.1.0
 ===============================