root/dev/common/includes/autoupgrade.php @ 216

Revision 216, 20.7 KB (checked in by ralle030583, 16 years ago)

- new table kb3_navigation
- new Admin Section Navigation - Top Navigation
- removes customable top nav bar changes which came with last revs
- new tablestruct added to autoupgrade.php
- db_cache error when creating new table fixed

Line 
1<?php
2require_once("db.php");
3function check_commenttable()
4{
5    $qry = new DBQuery();
6    $query = 'select count(*) from kb3_comments';
7    $result = mysql_query($query);
8    if ($result)
9    {
10        check_commenttablerow();
11        return;
12    }
13    $query = 'CREATE TABLE `kb3_comments` (
14        `ID` INT NOT NULL AUTO_INCREMENT ,
15        `kll_id` INT NOT NULL ,
16        `comment` TEXT NOT NULL ,
17        `name` TINYTEXT NOT NULL ,
18        `posttime` TIMESTAMP DEFAULT \'0000-00-00 00:00:00\' NOT NULL,
19        PRIMARY KEY ( `ID` )
20        ) TYPE = MYISAM';
21    $qry->execute($query);
22}
23
24function check_navigationtable(){
25        $qry = new DBQuery();
26        $query = 'select count(*) from kb3_navigation';
27        $result = mysql_query($query);
28        if ($result)
29        {
30            return;
31        }
32        $query = 'CREATE TABLE `kb3_navigation` (
33        `ID` INT NOT NULL AUTO_INCREMENT ,
34        `nav_type` TINYTEXT NOT NULL,
35        `intern` INT ( 1 ) NOT NULL,
36        `descr` TINYTEXT NOT NULL ,
37        `url` TINYTEXT NOT NULL ,
38        `target` VARCHAR( 10 )  NOT NULL,
39        `posnr` INT NOT NULL,
40        `page` TINYTEXT NOT NULL,
41        PRIMARY KEY ( `ID` )
42        ) TYPE = MYISAM';
43           $qry->execute($query);
44        if (CORP_ID)
45        {
46            $statlink = '?a=corp_detail&crp_id='.CORP_ID;
47        }
48        elseif (ALLIANCE_ID)
49        {
50            $statlink = '?a=alliance_detail&all_id='.ALLIANCE_ID;
51        }
52        $queries = "INSERT IGNORE INTO `kb3_navigation` VALUES (1,'top',1,'Home','?a=home','_self',1,'ALL_PAGES');
53                INSERT IGNORE INTO `kb3_navigation` VALUES (2,'top',1,'Campaings','?a=campaigns','_self',2,'ALL_PAGES');
54                INSERT IGNORE INTO `kb3_navigation` VALUES (3,'top',1,'Contracts','?a=contracts','_self',3,'ALL_PAGES');
55                INSERT IGNORE INTO `kb3_navigation` VALUES (4,'top',1,'Kills','?a=home','_self',4,'ALL_PAGES');
56                INSERT IGNORE INTO `kb3_navigation` VALUES (5,'top',1,'Losses','?a=losses','_self',5,'ALL_PAGES');
57                INSERT IGNORE INTO `kb3_navigation` VALUES (6,'top',1,'Post Mail','?a=post','_self',6,'ALL_PAGES');
58                INSERT IGNORE INTO `kb3_navigation` VALUES (7,'top',1,'Stats','$statlink','_self',7,'ALL_PAGES');
59                INSERT IGNORE INTO `kb3_navigation` VALUES (8,'top',1,'Awards','?a=awards','_self',8,'ALL_PAGES');
60                INSERT IGNORE INTO `kb3_navigation` VALUES (9,'top',1,'Standings','?a=standings','_self',9,'ALL_PAGES');
61                INSERT IGNORE INTO `kb3_navigation` VALUES (10,'top',1,'Search','?a=search','_self',10,'ALL_PAGES');
62                INSERT IGNORE INTO `kb3_navigation` VALUES (11,'top',1,'Admin','?a=admin','_self',11,'ALL_PAGES');
63                INSERT IGNORE INTO `kb3_navigation` VALUES (12,'top',1,'About','?a=about','_self',12,'ALL_PAGES');";
64        $query = explode("\n", $queries);
65        foreach ($query as $querystring)
66        {
67                if ($string = trim(str_replace(');', ')', $querystring)))
68                {
69                    $qry->execute($string);
70                }
71        }
72}       
73
74function check_commenttablerow()
75{
76    $qry = new DBQuery();
77    $query = 'select posttime from kb3_comments limit 1';
78    $result = mysql_query($query);
79    if ($result)
80    {
81        $query = 'ALTER TABLE `kb3_comments` CHANGE `ID` `id` INT( 11 ) NOT NULL AUTO_INCREMENT';
82        $qry->execute($query);
83        return;
84    }
85    $query = 'ALTER TABLE `kb3_comments` ADD `posttime` TIMESTAMP DEFAULT \'0000-00-00 00:00:00\' NOT NULL';
86    $qry->execute($query);
87}
88
89function check_shipvaltable()
90{
91    $qry = new DBQuery();
92    $query = 'select count(*) from kb3_ships_values';
93    $result = mysql_query($query);
94    if ($result)
95    {
96        return;
97    }
98    $query = 'CREATE TABLE `kb3_ships_values` (
99`shp_id` INT( 11 ) NOT NULL ,
100`shp_value` BIGINT( 4 ) NOT NULL ,
101PRIMARY KEY ( `shp_id` )
102) TYPE = MYISAM ;';
103    $qry->execute($query);
104    $qry->execute('UPDATE kb3_ships set shp_class = 8 WHERE shp_id=257 limit 1');
105    $qry->execute('UPDATE kb3_ships set shp_class = 8 WHERE shp_id=252 limit 1');
106    $qry->execute('UPDATE kb3_ships set shp_class = 4 WHERE shp_id=266 limit 1');
107    $qry->execute('UPDATE kb3_ships set shp_class = 4 WHERE shp_id=275 limit 1');
108    $qry->execute('UPDATE kb3_ships set shp_class = 4 WHERE shp_id=272 limit 1');
109    $qry->execute('UPDATE kb3_ships set shp_class = 4 WHERE shp_id=246 limit 1');
110    $qry->execute('UPDATE kb3_ships set shp_class = 4 WHERE shp_id=249 limit 1');
111    $qry->execute('UPDATE kb3_ships set shp_techlevel = 2 where shp_class = 22');
112}
113
114function check_invdetail()
115{
116    $qry = new DBQuery();
117    $query = 'select ind_sec_status from kb3_inv_detail limit 1';
118    $qry->execute($query);
119    $len = mysql_field_len($qry->resid_,0);
120    if ($len == 4)
121    {
122        $query = 'ALTER TABLE `kb3_inv_detail` CHANGE `ind_sec_status` `ind_sec_status` VARCHAR(5)';
123        $qry->execute($query);
124    }
125}
126
127function check_pilots()
128{
129    $qry = new DBQuery();
130    $query = 'select plt_name from kb3_pilots limit 1';
131    $qry->execute($query);
132    $len = mysql_field_len($qry->resid_,0);
133    if ($len == 32)
134    {
135        $query = 'ALTER TABLE `kb3_pilots` CHANGE `plt_name` `plt_name` VARCHAR(64) NOT NULL';
136        $qry->execute($query);
137    }
138}
139
140function check_contracts()
141{
142    $qry = new DBQuery();
143    $query = 'select ctd_sys_id from kb3_contract_details limit 1';
144    $result = mysql_query($query);
145    if ($result)
146    {
147        return;
148    }
149    $qry->execute('ALTER TABLE `kb3_contract_details` ADD `ctd_sys_id` INT(11) NOT NULL DEFAULT \'0\'');
150
151    $qry->execute('SHOW columns from `kb3_contract_details` like \'ctd_ctr_id\'');
152    $arr = $qry->getRow();
153    if ($arr['Key'] == 'PRI')
154    {
155        return;
156    }
157    $qry->execute('ALTER TABLE `kb3_contract_details` ADD INDEX (`ctd_ctr_id`) ');
158}
159function check_index()
160{
161    check_index_invcrp();
162    check_index_invall();
163    $qry = new DBQuery();
164    $qry->execute('SHOW columns from kb3_item_types like \'itt_id\'');
165    $arr = $qry->getRow();
166    if ($arr['Key'] == 'PRI')
167    {
168        return;
169    }
170    $qry->execute('ALTER TABLE `kb3_item_types` ADD PRIMARY KEY ( `itt_id` ) ');
171}
172function check_index_invcrp()
173{
174    $qry = new DBQuery();
175    $qry->execute('SHOW columns from kb3_inv_crp like \'inc_kll_id\'');
176    $arr = $qry->getRow();
177    if ($arr['Key'] == 'MUL')
178    {
179        return;
180    }
181    $qry->execute('ALTER TABLE `kb3_inv_crp` ADD INDEX ( `inc_kll_id` ) ');
182}
183function check_index_invall()
184{
185    $qry = new DBQuery();
186    $qry->execute('SHOW columns from kb3_inv_all like \'ina_kll_id\'');
187    $arr = $qry->getRow();
188    if ($arr['Key'] == 'MUL')
189    {
190        return;
191    }
192    $qry->execute('ALTER TABLE `kb3_inv_all` ADD INDEX ( `ina_kll_id` ) ');
193}
194function check_tblstrct1()
195{
196    $qry = new DBQuery();
197    $query = 'select shp_description from kb3_ships limit 1';
198    $result = mysql_query($query);
199    if (!$result)
200    {
201        return;
202    }
203    $query = 'ALTER TABLE `kb3_ships` DROP `shp_description`';
204    $qry->execute($query);
205}
206function check_tblstrct2()
207{
208    $qry = new DBQuery();
209    $query = 'select itm_description from kb3_items limit 1';
210    $result = mysql_query($query);
211    if (!$result)
212    {
213        return;
214    }
215    $query = 'ALTER TABLE `kb3_items` DROP `itm_description`';
216    $qry->execute($query);
217}
218function check_tblstrct3()
219{
220    $qry = new DBQuery();
221    $query = 'select Value from kb3_items limit 1';
222    $result = mysql_query($query);
223    if ($result)
224    {
225        $query = 'ALTER TABLE `kb3_items` CHANGE `Value` `itm_value` INT( 11 ) NOT NULL DEFAULT \'0\'';
226        $qry->execute($query);
227    }
228}
229function check_tblstrct4()
230{
231    $qry = new DBQuery();
232    $query = 'select itm_value from kb3_items limit 1';
233    $result = mysql_query($query);
234    if ($result)
235    {
236        return;
237    }
238    $query = 'ALTER TABLE `kb3_items` ADD `itm_value` INT( 11 ) NOT NULL DEFAULT \'0\'';
239    $qry->execute($query);
240    $qry->execute('ALTER TABLE `kb3_items` CHANGE `itm_externalid` `itm_externalid` INT( 11 ) NOT NULL DEFAULT \'0\'');
241}
242
243function check_tblstrct5()
244{
245    $qry = new DBQuery();
246    $query = 'select count(*) from kb3_standings';
247    $result = mysql_query($query);
248    if ($result)
249    {
250        $query = 'select count(*) from kb3_standings where sta_from=1 and sta_to=1 and sta_from_type=\'a\' and
251                  sta_to_type=\'c\'';
252        $result = mysql_query($query);
253        if ($result)
254        {
255            return;
256        }
257        $qry->execute('drop table kb3_standings');
258    }
259$query = 'CREATE TABLE `kb3_standings` (
260  `sta_from` int(11) NOT NULL default \'0\',
261  `sta_to` int(11) NOT NULL default \'0\',
262  `sta_from_type` enum(\'a\',\'c\') NOT NULL default \'a\',
263  `sta_to_type` enum(\'a\',\'c\') NOT NULL default \'a\',
264  `sta_value` float NOT NULL default \'0\',
265  `sta_comment` varchar(200) NOT NULL,
266  KEY `sta_from` (`sta_from`)
267) TYPE=MyISAM;';
268    $qry->execute($query);
269}
270
271function chk_kb3_items()
272{
273    $qry = new DBQuery();
274    $query = 'select count(*) from kb3_item_types where itt_id = 787';
275    $result = mysql_query($query);
276    $result = mysql_fetch_array($result);
277    if ($result['cnt'] == 1)
278    {
279        return;
280    }
281    $queries = "
282        INSERT IGNORE INTO `kb3_item_types` VALUES (737, 'Gas Cloud Harvester',1);
283        INSERT IGNORE INTO `kb3_item_types` VALUES (762, 'Inertia Stabilizer',3);
284        INSERT IGNORE INTO `kb3_item_types` VALUES (763, 'Nanofiber Internal Structure',3);
285        INSERT IGNORE INTO `kb3_item_types` VALUES (764, 'Overdrive Injector System',3);
286        INSERT IGNORE INTO `kb3_item_types` VALUES (765, 'Expanded Cargohold',3);
287        INSERT IGNORE INTO `kb3_item_types` VALUES (766, 'Power Diagnostic System',3);
288        INSERT IGNORE INTO `kb3_item_types` VALUES (767, 'Capacitor Power Relay',3);
289        INSERT IGNORE INTO `kb3_item_types` VALUES (768, 'Capacitor Flux Coil',3);
290        INSERT IGNORE INTO `kb3_item_types` VALUES (769, 'Reactor Control Unit',3);
291        INSERT IGNORE INTO `kb3_item_types` VALUES (770, 'Shield Flux Coil',3);
292        INSERT IGNORE INTO `kb3_item_types` VALUES (771, 'Missile Launcher Heavy Assault',1);
293        INSERT IGNORE INTO `kb3_item_types` VALUES (738, 'Cyber Armor', 0);
294        INSERT IGNORE INTO `kb3_item_types` VALUES (740, 'Cyber Electronics', 0);
295        INSERT IGNORE INTO `kb3_item_types` VALUES (741, 'Cyber Engineering', 0);
296        INSERT IGNORE INTO `kb3_item_types` VALUES (742, 'Cyber Gunnery', 0);
297        INSERT IGNORE INTO `kb3_item_types` VALUES (743, 'Cyber Industry', 0);
298        INSERT IGNORE INTO `kb3_item_types` VALUES (744, 'Cyber Leadership', 0);
299        INSERT IGNORE INTO `kb3_item_types` VALUES (745, 'Cyber Learning', 0);
300        INSERT IGNORE INTO `kb3_item_types` VALUES (746, 'Cyber Missile', 0);
301        INSERT IGNORE INTO `kb3_item_types` VALUES (747, 'Cyber Navigation', 0);
302        INSERT IGNORE INTO `kb3_item_types` VALUES (748, 'Cyber Science', 0);
303        INSERT IGNORE INTO `kb3_item_types` VALUES (749, 'Cyber Shields', 0);
304        INSERT IGNORE INTO `kb3_item_types` VALUES (772, 'Assault Missile', 0);
305        INSERT IGNORE INTO `kb3_item_types` VALUES (773, 'Rig Armor', 5);
306        INSERT IGNORE INTO `kb3_item_types` VALUES (774, 'Rig Shield', 5);
307        INSERT IGNORE INTO `kb3_item_types` VALUES (775, 'Rig Energy Weapon', 5);
308        INSERT IGNORE INTO `kb3_item_types` VALUES (776, 'Rig Hybrid Weapon', 5);
309        INSERT IGNORE INTO `kb3_item_types` VALUES (777, 'Rig Projectile Weapon', 5);
310        INSERT IGNORE INTO `kb3_item_types` VALUES (778, 'Rig Drones', 5);
311        INSERT IGNORE INTO `kb3_item_types` VALUES (779, 'Rig Launcher', 5);
312        INSERT IGNORE INTO `kb3_item_types` VALUES (780, 'Rig Electronics', 5);
313        INSERT IGNORE INTO `kb3_item_types` VALUES (781, 'Rig Energy Grid', 5);
314        INSERT IGNORE INTO `kb3_item_types` VALUES (782, 'Rig Astronautic', 5);
315        INSERT IGNORE INTO `kb3_item_types` VALUES (783, 'Cyber X Specials', 0);
316        INSERT IGNORE INTO `kb3_item_types` VALUES (785, 'Script', 0);
317        INSERT IGNORE INTO `kb3_item_types` VALUES (786, 'Rig Electronics Superiority', 5);
318        INSERT IGNORE INTO `kb3_item_types` VALUES (722, 'Advanced Hybrid Ammo Blueprint', 0);
319        INSERT IGNORE INTO `kb3_item_types` VALUES (723, 'Tractor Beam Blueprint', 0);
320        INSERT IGNORE INTO `kb3_item_types` VALUES (724, 'Implant Blueprints', 0);
321        INSERT IGNORE INTO `kb3_item_types` VALUES (725, 'Advanced Projectile Ammo Blueprint', 0);
322        INSERT IGNORE INTO `kb3_item_types` VALUES (726, 'Advanced Frequency Crystal Blueprint', 0);
323        INSERT IGNORE INTO `kb3_item_types` VALUES (727, 'Mining Crystal Blueprint', 0);
324        INSERT IGNORE INTO `kb3_item_types` VALUES (728, 'Decryptors - Amarr', 0);
325        INSERT IGNORE INTO `kb3_item_types` VALUES (729, 'Decryptors - Minmatar', 0);
326        INSERT IGNORE INTO `kb3_item_types` VALUES (730, 'Decryptors - Gallente', 0);
327        INSERT IGNORE INTO `kb3_item_types` VALUES (731, 'Decryptors - Caldari', 0);
328        INSERT IGNORE INTO `kb3_item_types` VALUES (732, 'Decryptors - Sleepers', 0);
329        INSERT IGNORE INTO `kb3_item_types` VALUES (733, 'Decryptors - Yan Jung', 0);
330        INSERT IGNORE INTO `kb3_item_types` VALUES (734, 'Decryptors - Takmahl', 0);
331        INSERT IGNORE INTO `kb3_item_types` VALUES (735, 'Decryptors - Talocan', 0);
332        INSERT IGNORE INTO `kb3_item_types` VALUES (754, 'Salvaged Materials', 0);
333        INSERT IGNORE INTO `kb3_item_types` VALUES (784, 'Large Collidable Ship', 0);
334        INSERT IGNORE INTO `kb3_item_types` VALUES (787, 'Rig Blueprint', 0);
335        ";
336    $query = explode("\n", $queries);
337    foreach ($query as $querystring)
338    {
339        if ($string = trim(str_replace(');', ')', $querystring)))
340        {
341            $qry->execute($string);
342        }
343    }
344}
345function chk_kb3_items2()
346{
347    $qry = new DBQuery();
348    $query = 'select itm_externalid from kb3_items where itm_name = \'Repair Drone\'';
349    $result = mysql_query($query);
350    $result = mysql_fetch_array($result);
351    if ($result['itm_externalid'] == '9871')
352    {
353        return;
354    }
355    $queries = "
356            update kb3_items set itm_externalid='10246' where itm_name='Mining Drone I';
357            update kb3_items set itm_externalid='10248' where itm_name='Mining Drone - Improved UNUSED';
358            update kb3_items set itm_externalid='10250' where itm_name='Mining Drone II';
359            update kb3_items set itm_externalid='1187' where itm_name='Mining Drone - Elite';
360            update kb3_items set itm_externalid='1201' where itm_name='Proximity Drone';
361            update kb3_items set itm_externalid='1202' where itm_name='Wasp I';
362            update kb3_items set itm_externalid='15508' where itm_name='Civilian Mining Drone';
363            update kb3_items set itm_externalid='15510' where itm_name='Vespa I';
364            update kb3_items set itm_externalid='16206' where itm_name='Valkyrie I';
365            update kb3_items set itm_externalid='17565' where itm_name='Hellhound I';
366            update kb3_items set itm_externalid='21050' where itm_name='Unanchoring Drone';
367            update kb3_items set itm_externalid='21638' where itm_name='Survey Drone';
368            update kb3_items set itm_externalid='21640' where itm_name='Vespa II';
369            update kb3_items set itm_externalid='2173' where itm_name='Valkyrie II';
370            update kb3_items set itm_externalid='2175' where itm_name='Infiltrator I';
371            update kb3_items set itm_externalid='2183' where itm_name='Infiltrator II';
372            update kb3_items set itm_externalid='2185' where itm_name='Hammerhead I';
373            update kb3_items set itm_externalid='2193' where itm_name='Hammerhead II';
374            update kb3_items set itm_externalid='2195' where itm_name='Praetor I';
375            update kb3_items set itm_externalid='2203' where itm_name='Praetor II';
376            update kb3_items set itm_externalid='2205' where itm_name='Acolyte I';
377            update kb3_items set itm_externalid='2205' where itm_name='Acolyte II';
378            update kb3_items set itm_externalid='22572' where itm_name='Praetor EV-900';
379            update kb3_items set itm_externalid='22574' where itm_name='Warp Scrambling Drone';
380            update kb3_items set itm_externalid='22713' where itm_name='10mn webscramblifying Drone';
381            update kb3_items set itm_externalid='22765' where itm_name='Heavy Shield Maintenance Bot I';
382            update kb3_items set itm_externalid='22780' where itm_name='Fighter Uno';
383            update kb3_items set itm_externalid='23055' where itm_name='Templar';
384            update kb3_items set itm_externalid='23057' where itm_name='Dragonfly';
385            update kb3_items set itm_externalid='23059' where itm_name='Firbolg';
386            update kb3_items set itm_externalid='23061' where itm_name='Einherji';
387            update kb3_items set itm_externalid='23473' where itm_name='Wasp EC-900';
388            update kb3_items set itm_externalid='23506' where itm_name='Ogre SD-900';
389            update kb3_items set itm_externalid='23510' where itm_name='Praetor TD-900';
390            update kb3_items set itm_externalid='23512' where itm_name='Berserker TP-900';
391            update kb3_items set itm_externalid='23523' where itm_name='Heavy Armor Maintenance Bot I';
392            update kb3_items set itm_externalid='23525' where itm_name='Curator I';
393            update kb3_items set itm_externalid='23559' where itm_name='Berserker SW-900';
394            update kb3_items set itm_externalid='23559' where itm_name='Warden I';
395            update kb3_items set itm_externalid='23561' where itm_name='Garde I';
396            update kb3_items set itm_externalid='23563' where itm_name='Bouncer I';
397            update kb3_items set itm_externalid='23659' where itm_name='Acolyte EV-300';
398            update kb3_items set itm_externalid='23702' where itm_name='Infiltrator EV-600';
399            update kb3_items set itm_externalid='23705' where itm_name='Vespa EC-600';
400            update kb3_items set itm_externalid='23707' where itm_name='Hornet EC-300';
401            update kb3_items set itm_externalid='23709' where itm_name='Medium Armor Maintenance Bot I';
402            update kb3_items set itm_externalid='23711' where itm_name='Light Armor Maintenance Bot I';
403            update kb3_items set itm_externalid='23713' where itm_name='Hammerhead SD-600';
404            update kb3_items set itm_externalid='23715' where itm_name='Hobgoblin SD-300';
405            update kb3_items set itm_externalid='23717' where itm_name='Medium Shield Maintenance Bot I';
406            update kb3_items set itm_externalid='23719' where itm_name='Light Shield Maintenance Bot I';
407            update kb3_items set itm_externalid='23721' where itm_name='Valkyrie TP-600';
408            update kb3_items set itm_externalid='23723' where itm_name='Warrior TP-300';
409            update kb3_items set itm_externalid='23725' where itm_name='Infiltrator TD-600';
410            update kb3_items set itm_externalid='23727' where itm_name='Acolyte TD-300';
411            update kb3_items set itm_externalid='23729' where itm_name='Valkyrie SW-600';
412            update kb3_items set itm_externalid='23731' where itm_name='Warrior SW-300';
413            update kb3_items set itm_externalid='23759' where itm_name='FA-14 Templar';
414            update kb3_items set itm_externalid='2436' where itm_name='Wasp II';
415            update kb3_items set itm_externalid='2444' where itm_name='Ogre I';
416            update kb3_items set itm_externalid='2446' where itm_name='Ogre II';
417            update kb3_items set itm_externalid='2454' where itm_name='Hobgoblin I';
418            update kb3_items set itm_externalid='2456' where itm_name='Hobgoblin II';
419            update kb3_items set itm_externalid='24618' where itm_name='horrible tracking drone';
420            update kb3_items set itm_externalid='2464' where itm_name='Hornet I';
421            update kb3_items set itm_externalid='2466' where itm_name='Hornet II';
422            update kb3_items set itm_externalid='2476' where itm_name='Berserker I';
423            update kb3_items set itm_externalid='2478' where itm_name='Berserker II';
424            update kb3_items set itm_externalid='2486' where itm_name='Warrior I';
425            update kb3_items set itm_externalid='2488' where itm_name='Warrior II';
426            update kb3_items set itm_externalid='3218' where itm_name='Harvester Mining Drone';
427            update kb3_items set itm_externalid='3549' where itm_name='Tutorial Attack Drone';
428            update kb3_items set itm_externalid='9871' where itm_name='Repair Drone';
429        ";
430    $query = explode("\n", $queries);
431    foreach ($query as $querystring)
432    {
433        if ($string = trim(str_replace(');', ')', $querystring)))
434        {
435            $qry->execute($string);
436        }
437    }
438}
439function check_tblstrct6()
440{
441    $qry = new DBQuery();
442    $query = 'select all_img from kb3_alliances limit 1';
443    $result = mysql_query($query);
444    if (!$result)
445    {
446        return;
447    }
448    $query = 'ALTER TABLE `kb3_alliances` DROP `all_img`';
449    $qry->execute($query);
450}
451?>
Note: See TracBrowser for help on using the browser.