Merge pull request #435 from errorage/master

Library table update.
This commit is contained in:
Pete Goodfellow
2013-04-23 09:47:16 -07:00
2 changed files with 9 additions and 9 deletions
+8 -8
View File
@@ -164,16 +164,16 @@ CREATE TABLE `erro_legacy_population` (
--
DROP TABLE IF EXISTS `erro_library`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `erro_library` (
`id` int(11) NOT NULL DEFAULT '0',
`author` text NOT NULL,
`title` text NOT NULL,
`id` int(11) NOT NULL AUTO_INCREMENT,
`author` varchar(45) NOT NULL,
`title` varchar(45) NOT NULL,
`content` text NOT NULL,
`category` text NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
`category` varchar(45) NOT NULL,
`ckey` varchar(45) DEFAULT 'LEGACY',
`datetime` datetime DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5370 DEFAULT CHARSET=latin1;
--
-- Table structure for table `erro_player`
+1 -1
View File
@@ -351,7 +351,7 @@ datum/borrowbook // Datum used to keep track of who has borrowed what when and f
var/sqlauthor = sanitizeSQL(scanner.cache.author)
var/sqlcontent = sanitizeSQL(scanner.cache.dat)
var/sqlcategory = sanitizeSQL(upload_category)
var/DBQuery/query = dbcon.NewQuery("INSERT INTO erro_library (author, title, content, category) VALUES ('[sqlauthor]', '[sqltitle]', '[sqlcontent]', '[sqlcategory]')")
var/DBQuery/query = dbcon.NewQuery("INSERT INTO erro_library (author, title, content, category, ckey, datetime) VALUES ('[sqlauthor]', '[sqltitle]', '[sqlcontent]', '[sqlcategory]', '[usr.ckey]', Now())")
if(!query.Execute())
usr << query.ErrorMsg()
else