Good vs. Evil

  • The FTB Forum is now read-only, and is here as an archive. To participate in our community discussions, please join our Discord! https://ftb.team/discord

lenscas

Over-Achiever
Jul 31, 2013
2,015
1,801
248
98 @Someone Else 37 well, it currently creates prepared statements due to me using luaDBI. However I will have to drop that sooner or later and replace it with luaSQL due to it not updating. Luasql doesn't support prepared statements and I thus need to escape everything instead. Which is less secure I think.
 

lenscas

Over-Achiever
Jul 31, 2013
2,015
1,801
248
42 and suddenly lua is being annoying.
./lcCore/database.lua:72: bad argument #2 to 'print' (expected table to have __tostring metamethod)
:(

edit:41
 

lenscas

Over-Achiever
Jul 31, 2013
2,015
1,801
248
42 and I fixed the problem which let me to find the above thing (which isn't much of a problem as you probably don't need a tostring on a table anyway)
But then I thaught about the fact that a update probably needs some more escaping then just the values used in the where thus need to rewrite some things but this looks promising
UPDATE users
SETid = 2 , name = LOLZ
WHERE id = ?
THIS IS ONLY HERE TO CAUSE A CRASH <! WHERE AWEOMSECheck the sql syntax.

(missing space is already fixed)
 

lenscas

Over-Achiever
Jul 31, 2013
2,015
1,801
248
41 because
Code:
errors,message=sth:execute(unpack(self.values),unpack(self.arguments))
won't work.
(Having said that, there might be a syntax for it to get it to work but....meh I have another work around already)