Show
Ignore:
Timestamp:
09/08/07 01:21:32 (15 years ago)
Author:
ralle030583
Message:

buxfix in autoupgrade.php

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • dev/common/includes/autoupgrade.php

    r234 r235  
    3131        return; 
    3232    } 
    33     $query =    "INSERT IGNORE INTO kb3_ship_classes(scl_id,scl_class,scl_value,scl_points) 
    34                                         values ('','Cap. Industrial','1850000000','5000'); 
    35                                 INSERT IGNORE INTO kb3_ships(shp_id,shp_name,shp_class,shp_externalid,shp_rce_id,shp_baseprice,shp_techlevel) 
    36                                         values ('','Rorqual','','28352','0','1850000000','1'); 
    37                                 UPDATE kb3_ships set kb3_ships.shp_class=(select scl_id from kb3_ship_classes where scl_class='Cap. Industrial') where kb3_ships.shp_name='Rorqual'; 
    38                                 INSERT IGNORE INTO kb3_ships_values(shp_id,shp_value) 
    39                                         values ((select kb3_ships.shp_id from kb3_ships where kb3_ships.shp_name='Rorqual'),'1850000000');"; 
    40     $qry->execute($query); 
     33    $queries =  "INSERT IGNORE INTO kb3_ship_classes(scl_id,scl_class,scl_value,scl_points)     values ('','Cap. Industrial','1850000000','5000'); 
     34                                 INSERT IGNORE INTO kb3_ships(shp_id,shp_name,shp_class,shp_externalid,shp_rce_id,shp_baseprice,shp_techlevel) values ('','Rorqual','','28352','0','1850000000','1'); 
     35                                 UPDATE kb3_ships set kb3_ships.shp_class=(select scl_id from kb3_ship_classes where scl_class='Cap. Industrial') where kb3_ships.shp_name='Rorqual'; 
     36                                 INSERT IGNORE INTO kb3_ships_values(shp_id,shp_value) values ((select kb3_ships.shp_id from kb3_ships where kb3_ships.shp_name='Rorqual'),'1850000000');"; 
     37        $query = explode("\n", $queries); 
     38        foreach ($query as $querystring) 
     39        { 
     40                if ($string = trim(str_replace(');', ')', $querystring))) 
     41                { 
     42                    $qry->execute($string); 
     43                } 
     44        } 
    4145} 
    4246