Uploading Books Updated

Now includes a time of upload, and the uploader's CKey. For tracking
purposes.
This commit is contained in:
skull132
2015-04-13 17:02:54 +03:00
parent 381a9eb197
commit a2582011c8
+2 -1
View File
@@ -346,7 +346,8 @@ 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_old.NewQuery("INSERT INTO library (author, title, content, category) VALUES ('[sqlauthor]', '[sqltitle]', '[sqlcontent]', '[sqlcategory]')")
var/sqluploader = sanitizeSQL(usr.key)
var/DBQuery/query = dbcon_old.NewQuery("INSERT INTO library (author, title, content, category, uploadtime, uploader) VALUES ('[sqlauthor]', '[sqltitle]', '[sqlcontent]', '[sqlcategory]', Now(), '[sqluploader]')")
if(!query.Execute())
usr << query.ErrorMsg()
else