Kevin Hartin Active Member Licensed User Jan 21, 2022 #1 One thing I find really useful in PHP is the ability to dynamically create variables from the results of a SQL query using something like; Dynamic variables: foreach ($rw as $key=>$val) { ${$key} = $val; $_SESSION[$key] = $val; } Is there a technique to do the same in B4x? Thanks, Kev
One thing I find really useful in PHP is the ability to dynamically create variables from the results of a SQL query using something like; Dynamic variables: foreach ($rw as $key=>$val) { ${$key} = $val; $_SESSION[$key] = $val; } Is there a technique to do the same in B4x? Thanks, Kev
LucaMs Expert Licensed User Longtime User Jan 22, 2022 #2 Maybe you could use a Map, using text from any source and use it as a Map key. Obviously it's not quite the same but it might help you. Upvote 1
Maybe you could use a Map, using text from any source and use it as a Map key. Obviously it's not quite the same but it might help you.
Kevin Hartin Active Member Licensed User Jan 24, 2022 #3 LucaMs said: Maybe you could use a Map, using text from any source and use it as a Map key. Obviously it's not quite the same but it might help you. Click to expand... I thought that may be the closest thing. I haven't done much with maps but recently discovered File.WriteMap and File.ReadMap to save some app settings in a file for use the next session. I have also sucessfully encrypted and decrypted this, which is handy. Thanks, Kev Upvote 0
LucaMs said: Maybe you could use a Map, using text from any source and use it as a Map key. Obviously it's not quite the same but it might help you. Click to expand... I thought that may be the closest thing. I haven't done much with maps but recently discovered File.WriteMap and File.ReadMap to save some app settings in a file for use the next session. I have also sucessfully encrypted and decrypted this, which is handy. Thanks, Kev