Multiple tables and JOIN's have syntax changes in MySQL 5.0.12. Need parentheses.
authorJoe Hunt <joe.hunt.consulting@gmail.com>
Thu, 3 May 2007 22:45:29 +0000 (22:45 +0000)
committerJoe Hunt <joe.hunt.consulting@gmail.com>
Thu, 3 May 2007 22:45:29 +0000 (22:45 +0000)
CHANGELOG.txt
includes/db/manufacturing_db.inc
manufacturing/includes/db/work_order_requirements_db.inc
sql/en_US-demo.sql

index 29510e0cbdf190380d687f8e815edb57fb34c866..55191e9c80cde5feb7837c19a4281798b4c29ff8 100644 (file)
@@ -19,6 +19,12 @@ Legend:
 ! -> Note
 $ -> Affected files
 
+03-May-2007 Joe Hunt
+ # Multiple tables and JOIN's have syntax changes in MySQL 5.0.12. Need parentheses.
+ $ /includes/db/manufacturing_db.inc
+   /manufacturing/includes/db/work_order_requirements_db.inc
+
+
 02-May-2007 Joe Hunt
  # Missing details on Purchase Order when emailing and printing
  $ /reporting/rep209.php
index 0c91583723d5250005f52111013ee178a4689eb0..f9249168536f67b86cb2c1c8d7145fc604955e75 100644 (file)
@@ -20,7 +20,7 @@ function get_bom($item)
        ".TB_PREF."stock_master.description, ".TB_PREF."stock_master.mb_flag AS ResourceType, 
        ".TB_PREF."stock_master.material_cost+ ".TB_PREF."stock_master.labour_cost+".TB_PREF."stock_master.overhead_cost AS standard_cost, units, 
        ".TB_PREF."bom.quantity * (".TB_PREF."stock_master.material_cost+ ".TB_PREF."stock_master.labour_cost+ ".TB_PREF."stock_master.overhead_cost) AS ComponentCost 
-       FROM ".TB_PREF."workcentres, ".TB_PREF."locations, ".TB_PREF."bom INNER JOIN ".TB_PREF."stock_master ON ".TB_PREF."bom.component = ".TB_PREF."stock_master.stock_id 
+       FROM (".TB_PREF."workcentres, ".TB_PREF."locations, ".TB_PREF."bom) INNER JOIN ".TB_PREF."stock_master ON ".TB_PREF."bom.component = ".TB_PREF."stock_master.stock_id 
        WHERE ".TB_PREF."bom.parent = '" . $item . "'
                AND ".TB_PREF."workcentres.id=CAST(".TB_PREF."bom.workcentre_added AS UNSIGNED) 
                AND ".TB_PREF."bom.loc_code = ".TB_PREF."locations.loc_code ORDER BY ".TB_PREF."bom.id";
index b96507d23e88a2ace6c48d4b328d847b4b8e41d1..8bee3cfe32a6523ebd6100abdc60254d4cf811ef 100644 (file)
@@ -6,7 +6,7 @@ function get_wo_requirements($woid)
                ".TB_PREF."stock_master.mb_flag, 
                ".TB_PREF."locations.location_name, 
                ".TB_PREF."workcentres.name AS WorkCentreDescription FROM 
-               ".TB_PREF."wo_requirements, ".TB_PREF."locations, ".TB_PREF."workcentres INNER JOIN ".TB_PREF."stock_master ON 
+               (".TB_PREF."wo_requirements, ".TB_PREF."locations, ".TB_PREF."workcentres) INNER JOIN ".TB_PREF."stock_master ON 
                ".TB_PREF."wo_requirements.stock_id = ".TB_PREF."stock_master.stock_id 
                WHERE workorder_id=$woid
                AND ".TB_PREF."locations.loc_code = ".TB_PREF."wo_requirements.loc_code
index fbaf94b8744cdf5ccd9c873f72561df6c92f8953..d385eeea89b1072514ad9788064e25dabd3ea661 100644 (file)
@@ -1916,7 +1916,7 @@ INSERT INTO `0_stock_master` VALUES ('102', 1, 1, '17 inch VGA Monitor', '', 'ea
 INSERT INTO `0_stock_master` VALUES ('103', 1, 1, '32MB VGA Card', '', 'each', 'B', '3000', '4010', '1420', '4210', '0', NULL, NULL, 0, 0, 0, 0, 0);
 INSERT INTO `0_stock_master` VALUES ('104', 1, 1, '52x CD Drive', '', 'each', 'B', '3000', '4010', '1420', '4210', '0', NULL, NULL, 0, 0, 0, 0, 0);
 INSERT INTO `0_stock_master` VALUES ('201', 2, 1, 'Assembly Labour', '', 'each', 'D', '3000', '4010', '1420', '4210', '0', NULL, NULL, 0, 0, 0, 0, 0);
-INSERT INTO `0_stock_master` VALUES ('3400', 3, 1, 'P4 Business System', '', 'each', 'M', '3000', '4010', '1420', '4210', '0', NULL, NULL, 0, 0, 0, 0, 0);
+INSERT INTO `0_stock_master` VALUES ('3400', 3, 1, 'P4 Business System', '', 'each', 'M', '3000', '4010', '1420', '4210', '1400', NULL, NULL, 0, 0, 0, 0, 0);
 
 -- 
 -- Data in table `stock_moves`