DiGiTal Posted July 28, 2018 Share Posted July 28, 2018 How can i create a row with many data in it(like in items) i think it should be with JSON Link to comment
itHyperoX Posted July 28, 2018 Share Posted July 28, 2018 (edited) Yes, you correct. With JSON. https://wiki.multitheftauto.com/wiki/ToJSON https://wiki.multitheftauto.com/wiki/FromJSON Edited July 28, 2018 by TheMOG Link to comment
DiGiTal Posted July 28, 2018 Author Share Posted July 28, 2018 14 minutes ago, TheMOG said: Yes, you correct. With JSON. https://wiki.multitheftauto.com/wiki/ToJSON https://wiki.multitheftauto.com/wiki/FromJSON an example ?? Link to comment
JeViCo Posted July 28, 2018 Share Posted July 28, 2018 34 minutes ago, DiGiTal said: an example ?? script code: sometable = {1, 2, 3} toJSON(sometable) -- OR toJSON({1, 2, 3}) in database (with toJSON) [[1, 2, 3]] it gives additional box brackets 1 Link to comment
DiGiTal Posted July 28, 2018 Author Share Posted July 28, 2018 3 minutes ago, Juuve said: script code: sometable = {1, 2, 3} toJSON(sometable) -- OR toJSON({1, 2, 3}) in database (with toJSON) [[1, 2, 3]] it gives additional box brackets what i writte in SQL ? in database (with toJSON) ? [[1, 2, 3]] this is the result in my db you mean? Link to comment
JeViCo Posted July 28, 2018 Share Posted July 28, 2018 2 hours ago, DiGiTal said: this is the result in my db you mean? uhhhh Here better example. script: dbExec(db, "UPDATE Vehicles SET Number = ? WHERE ID = ?", toJSON(newplate), vehid) database: 1 Link to comment
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