mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-10 10:21:11 +00:00
Ports TG's BSQL library (#26455)
* Ports TG's BSQL * write perms * my mistake * Missing migrations, fixes mistakes, removes unneeded logs * Missing migrations, fixes mistakes, removes unneeded logs * haha * Final missing migration, actually fix runtime * Fucked up this doesn't throw a warning * sql fixes; polls
This commit is contained in:
@@ -91,8 +91,11 @@
|
||||
var/sqlid = text2num(id)
|
||||
if(!sqlid)
|
||||
return
|
||||
var/DBQuery/query = dbcon_old.NewQuery("DELETE FROM library WHERE id=[sqlid]")
|
||||
query.Execute()
|
||||
var/datum/DBQuery/query = SSdbcore.NewQuery("DELETE FROM library WHERE id=[sqlid]")
|
||||
if(!query.Execute())
|
||||
message_admins("Error: [query.ErrorMsg()]")
|
||||
log_sql("Error: [query.ErrorMsg()]")
|
||||
qdel(query)
|
||||
|
||||
/datum/library_catalog/proc/getBookByID(var/id as text)
|
||||
if("[id]" in cached_books)
|
||||
@@ -101,8 +104,13 @@
|
||||
var/sqlid = text2num(id)
|
||||
if(!sqlid)
|
||||
return
|
||||
var/DBQuery/query = dbcon_old.NewQuery("SELECT id, author, title, category, ckey FROM library WHERE id=[sqlid]")
|
||||
query.Execute()
|
||||
var/datum/DBQuery/query = SSdbcore.NewQuery("SELECT id, author, title, category, ckey FROM library WHERE id=[sqlid]")
|
||||
if(!query.Execute())
|
||||
message_admins("Error: [query.ErrorMsg()]")
|
||||
log_sql("Error: [query.ErrorMsg()]")
|
||||
qdel(query)
|
||||
return
|
||||
qdel(query)
|
||||
|
||||
var/list/results=list()
|
||||
while(query.NextRow())
|
||||
|
||||
Reference in New Issue
Block a user