root/dev/install/install_step42.php @ 324

Revision 274, 1.0 KB (checked in by exi, 13 years ago)

Added new german translation parsing.
Changed upgrade sql so it doesn't kill all rows if something is wrong.

Line 
1<?php
2$stoppage = false;
3
4include_once('../kbconfig.php');
5$db = mysql_connect(DB_HOST, DB_USER, DB_PASS);
6mysql_select_db(DB_NAME);
7
8$query = "update kb3_items_destroyed
9            inner join kb3_items on itd_itm_id=itm_id
10            inner join kb3_invtypes on itm_name=typeName
11            set itd_itm_id=typeID";
12mysql_query($query);
13echo mysql_error();
14
15$query = "update kb3_inv_detail
16            inner join kb3_items on ind_wep_id=itm_id
17            inner join kb3_invtypes on itm_name=typeName
18            set ind_wep_id=typeID";
19mysql_query($query);
20echo mysql_error();
21
22$query = "insert into kb3_item_price
23            select typeID, itm_value as price
24            from kb3_items
25            left join kb3_invtypes on itm_name=typeName
26            where typeID is not null and itm_value != 0 and itm_value!=basePrice";
27mysql_query($query);
28echo mysql_error();
29
30?>
31<p>Queries executed, please proceed...</p>
32<?php if ($stoppage)
33{
34    return;
35}?>
36<p><a href="?step=<?php echo ($_SESSION['state']+1); ?>">Next Step</a></p>
Note: See TracBrowser for help on using the browser.