Jump to content

Store table on SQL ?


Feche1320

Recommended Posts

You can use:

toJSON 
fromJSON 

Example:

local myTable = { name = "me", money = 99999} 
local JSON_Table = toJSON(myTable) 

And then you can insert the 'JSON_Table' into the SQL, I think you already know how to, right?

And whenever you need it again, just pick it up from the SQL table, and turn it into the "original" Lua table like this:

local myTable2 = fromJSON(theValueYouGotFromSQL) 

Link to comment
You can use:
toJSON 
fromJSON 

Example:

local myTable = { name = "me", money = 99999} 
local JSON_Table = toJSON(myTable) 

And then you can insert the 'JSON_Table' into the SQL, I think you already know how to, right?

And whenever you need it again, just pick it up from the SQL table, and turn it into the "original" Lua table like this:

local myTable2 = fromJSON(theValueYouGotFromSQL) 

Thanks, by the way, is it faster to have a variable with a copy of my SQL database for like, checking if account is already registered?

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...