Ulysses
Home
Help
Ulysses
»
General
»
Developers Corner
»
SQL: table from string in row?
« previous next »
Print
Pages: [
1
]
Go Down
Author
Topic: SQL: table from string in row? (Read 5584 times)
0 Members and 1 Guest are viewing this topic.
Doomed
Newbie
Posts: 28
Karma: 0
SQL: table from string in row?
«
on:
January 15, 2019, 12:49:34 am »
In MySQL, is there a way to retrieve a
table
of information (like in the "Classes" column) rather than just a string or integer? It gets stored as a string, I just dont know of any gmod functions that can directly convert a string to a table. thanks
«
Last Edit: January 15, 2019, 12:56:27 am by Doomed
»
Logged
MrPresident
Ulysses Team Member
Hero Member
Posts: 2727
Karma: 430
Re: SQL: table from string in row?
«
Reply #1 on:
January 15, 2019, 06:58:41 am »
That's because MySQL doesn't store data as tables... only has strings or numbers.
You can use the following lua functions to serialize your tables and store/read them from MySQL:
http://wiki.garrysmod.com/page/util/TableToJSON
http://wiki.garrysmod.com/page/util/JSONToTable
Logged
Print
Pages: [
1
]
Go Up
« previous next »
Ulysses
»
General
»
Developers Corner
»
SQL: table from string in row?