./BlackBird# Posted July 5, 2014 Posted July 5, 2014 Can i insert table into Sql Cloumn ? #~BlackBird~#
MTA Team botder Posted July 5, 2014 MTA Team Posted July 5, 2014 No, and why? GitHub: Debug Console • MTA-Discord Relay Scripting: How to draw a line chart with DirectX functions? • Doppler Effect in MTA • Get the client's FPS • Customizable Blur Shader
./BlackBird# Posted July 5, 2014 Author Posted July 5, 2014 i mean like this local t = {"Test"} executeSQLQuery("INSERT INTO TestSql(value) VALUES(?)", t) #~BlackBird~#
Tete omar Posted July 5, 2014 Posted July 5, 2014 You can use the pair of the JSON functions; toJSON fromJSON They can be used to store a Lua table into SQL tables.
'LinKin Posted July 5, 2014 Posted July 5, 2014 @Tete: Can you give an example of it? Need a clanwar script? Click here! Do you want some free scripts for your DD server? Visit my website.
Tete omar Posted July 5, 2014 Posted July 5, 2014 Alright, local informative_table = { foo = "bar", green = { 0, 255, 0 }, table_name = "informative_table" } local JSON_structure = toJSON ( informative_table ) --[[ JSON_structure is a variable that contains a string containing a copy of 'informative_table', whenever we need this table, we can produce it using fromJSON ( JSON_structure ), e.g: local informative_table_2 = fromJSON ( JSON_structure ) and here we have another copy of 'informative_table' --]]
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now