Jump to content

[Help] toJSON/fromJSON


Tekken

Recommended Posts

I can't show my full code but

SAVE

local theID = getElementModel(element) 
local thenr = getElementHealth(element) 
local json = toJSON({theID, theNr}) 
--- Bla, bla 
dbQuery(db, "INSERT INTO table(json) VALUE(?)", json) 

LOAD

local theID, theNr = unpack(fromJSON(json)) 

Link to comment

Do you know how to/fromJSON work's ? when i send that data in THE SAME json will OVERRITE old data! and keep only the last one.

Man you are inserting new values every time did you tired :

dbExec(db, "UPDATE table(json) SET value = ? WHERE yourData = ?", json) 

Link to comment

Do you know how to/fromJSON work's ? when i send that data in THE SAME json will OVERRITE old data! and keep only the last one.

Man you are inserting new values every time did you tired :

dbExec(db, "UPDATE table(json) SET value = ? WHERE yourData = ?", json) 

this will just give NULL.

Link to comment
How we can help you if you dont want to show us your full codes? and the way that you reply us is so rude

I was a bit angry because i have some problems, but you didn't want to understand.

Bro how we suppose to know what is creating problem, you need to show us your full code because it's the only one solution.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...