[ESX, mySQL] Get lua table value from mySQL Database column

Good evening,

I want to get a Lua table value {“variable”,“variable2”} from a mySQL Database. Basically i want to save the blip names in the blips_found column.

Here is the Server code :

There is the problem: if i want to print the result for the blips_found column, it prints the text 1 to 1 as it stands in mySQl but not in lua table form like value = {“banana”, “cherry” } => prints: table 0x12419s912…

Thanks for every response!

Its saving the value in a JSON string so when you need to convert it back to a table using json.decode(result[1].blips_found)

ok thx worked

1 Like