mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 10:43:20 +00:00
Porting TG's SQL
This commit is contained in:
@@ -346,10 +346,10 @@ var/obj/machinery/blackbox_recorder/blackbox
|
||||
|
||||
round_end_data_gathering() //round_end time logging and some other data processing
|
||||
establish_db_connection()
|
||||
if(!dbcon.IsConnected()) return
|
||||
if(!SSdbcore.IsConnected()) return //CHOMPEdit TGSQL
|
||||
var/round_id
|
||||
|
||||
var/DBQuery/query = dbcon.NewQuery("SELECT MAX(round_id) AS round_id FROM erro_feedback")
|
||||
var/DBQuery/query = SSdbcore.NewQuery("SELECT MAX(round_id) AS round_id FROM erro_feedback") //CHOMPEdit TGSQL
|
||||
query.Execute()
|
||||
while(query.NextRow())
|
||||
round_id = query.item[1]
|
||||
@@ -360,7 +360,7 @@ var/obj/machinery/blackbox_recorder/blackbox
|
||||
|
||||
for(var/datum/feedback_variable/FV in feedback)
|
||||
var/sql = "INSERT INTO erro_feedback VALUES (null, Now(), [round_id], \"[FV.get_variable()]\", [FV.get_value()], \"[FV.get_details()]\")"
|
||||
var/DBQuery/query_insert = dbcon.NewQuery(sql)
|
||||
var/DBQuery/query_insert = SSdbcore.NewQuery(sql) //CHOMPEdit TGSQL
|
||||
query_insert.Execute()
|
||||
|
||||
// Sanitize inputs to avoid SQL injection attacks
|
||||
|
||||
Reference in New Issue
Block a user