root/dev/mods/apoc_fitting/sql.php @ 491

Revision 370, 0.9 KB (checked in by kovell, 11 years ago)

- SQL queries optimised for speed and error protection.
- feed syndication optimised
- front page includes optional clock and optional kill/loss display
- mysqli support added
- transaction protection of kills added where supported (mysqli and InnoDB)
- summary tables and contracts show total destroyed value instead of ship value
- html errors reduced
- related kill calculation improved
- query caching errors reduced
- minor bugfixes
- Smarty 2.6.25 added
- apoc fitting mod added and modded
- code optimisations
- code comments added (doxygen format)
- conflicting mods are now identified

Line 
1<?php
2function createtable() {
3    $query = "INSERT IGNORE INTO `kb3_item_locations` (`itl_id`, `itl_location`) VALUES(7, 'Subsystem Slot'); UPDATE `kb3_item_types` SET `itt_slot` = '7' WHERE `kb3_item_types`.`itt_id` = 954 LIMIT 1; UPDATE `kb3_item_types` SET `itt_slot` = '7' WHERE `kb3_item_types`.`itt_id` = 955 LIMIT 1; UPDATE `kb3_item_types` SET `itt_slot` = '7' WHERE `kb3_item_types`.`itt_id` = 956 LIMIT 1; UPDATE `kb3_item_types` SET `itt_slot` = '7' WHERE `kb3_item_types`.`itt_id` = 957 LIMIT 1; UPDATE `kb3_item_types` SET `itt_slot` = '7' WHERE `kb3_item_types`.`itt_id` = 958 LIMIT 1;";
4
5$arr= explode( '; ', $query );
6foreach( $arr as $command )
7{
8    $queryresult = mysql_query( $command ) or die ('Error with MySQL Query : ' .mysql_error());
9}
10
11    //$queryresult = mysql_query($query) or die ('Error with MySQL Query : ' .mysql_error());
12
13    if ($queryresult) {
14        return(1);
15    } else {
16        return(0);
17    }
18}
19?>
Note: See TracBrowser for help on using the browser.