wyattwic 38 Posted June 15, 2016 Hello, I have been practicing with extDB3 trying to learn how to use it well. So far I have been able to store data reliably, however I am stuck on finding ways to use the output read database. Here is the command I use when sending data to my DB. opt = "extDB3" callExtension format["0:SQL:INSERT INTO `players` (`UID`, `POS`, `DA`, `DAM`, `INV`, `VINV`, `STATE`) VALUES ('%1','%2','%3','%4','%5','%6','%7')",str getPlayerUID player,getpos player,str animationstate player,damage player,[false],[false],0] The database is equipped with a serialized PID and Admin level, however are not modified in the above command. The SQL server defaults them to their needed state as the last two fields in the return. When making a query to retrieve the above information, the below string is returned. "[1,[["76561198084733347",[1652.25,3132.99,0.00142646],"amovpercmstpsnonwnondnon",0,[false],[false],0,0,5]]]" How would you suggest I go about changing this from a string to an array in order to use the information? I know I may be missing a simple command, however a few hours of searching hasn't yielded anything. Thank you very much, Share this post Link to post Share on other sites
kylania 546 Posted June 15, 2016 https://community.bistudio.com/wiki/splitString 1 Share this post Link to post Share on other sites
mrcurry 258 Posted June 15, 2016 _array = call compile _return; Then separate the data using select or params. 2 Share this post Link to post Share on other sites
wyattwic 38 Posted June 15, 2016 Thank you Curry and Kylania! Kylania - I had attempted to try that, however when I am no longer using sample data there will be many nested arrays. I did have some luck with the sample data, but when I tested my much larger nested arrays I started to have issues. Curry's solution worked the best in this situation. Passing the earlier return through it produces the below array, ready to go. [1,[["76561198084733347",[1652.25,3132.99,0.00142646],"amovpercmstpsnonwnondnon",0,[false],[false],0,0,7]]] Thank you for the help! Share this post Link to post Share on other sites
kylania 546 Posted June 15, 2016 Neat, didn't realize that about compile. Nice! Share this post Link to post Share on other sites