r2411 added deleteRow functionality and fixed a nasty bug in makeHrefProcess()
[racktables] / upgrade.php
index 129b406f0f7b83bb72830e5caae339c04f5899d8..38fa9a051648bfedb69dd7a8af8d3baaf7bd1151 100644 (file)
@@ -185,12 +185,12 @@ CREATE TABLE `FileLink` (
                        $query[] = "alter table Dictionary change chapter_no chapter_id int(10) unsigned NOT NULL";
                        $query[] = "CREATE TABLE RackRow ( id int(10) unsigned NOT NULL auto_increment, name char(255) NOT NULL, PRIMARY KEY  (`id`) ) ENGINE=MyISAM";
 
-                       $result = $dbxlink->query ("select dict_key, dict_value from Dictionary where chapter_id = 3");
-                       while($result->fetch(PDO::FETCH_NUM))
+                       $result = $dbxlink->query ("select dict_key, dict_value from Dictionary where chapter_no = 3");
+                       while($row = $result->fetch(PDO::FETCH_NUM))
                        {
                                $query[] = "insert into RackRow set id=${row[0]}, name='${row[1]}'";
                        }
-                       $query[] = "delete from Dictionary where chapter_id = 3");
+                       $query[] = "delete from Dictionary where chapter_no = 3";
                        
                        break;
                default: