TMSYQL and tables

How would I use tmysql to generate a table like this using info from a database?

[lua]
modellist = {
[0] = { “Batman”, “models/batman/slow_pub_v2.mdl”},
[1] = { “Superman”, “models/superman/slow_pub.mdl” },
[2] = { “Catwoman”, “models/catwoman/slow_dark_pub_v2.mdl”},
[3] = { “Kingpin”, “models/kingpin/slow_v2.mdl” }
}
[/lua]

Any help guys?

You could try using util.TableToJSON it converts a table to a string then use util.JSONToTable to convert it back to a table

if that doesn’t help I would recommend looking at the string lib http://wiki.garrysmod.com/page/Libraries/string and the table lib http://wiki.garrysmod.com/page/table