Hi, this is my first day here.
I switched from LiveCode and got stuck when trying to get the contents of the fields related to the same ID of two different columns in a sqlite-database without using a ListBox as I did before.
Is there any way to open the db,
SELECT german, english FROM dictionary WHERE ID = X
and directly get one string containing the entry in both fields with ID X in the columns “german” and “english” from the rowset?
By standard, you should avoid to access Columns by ID, because it makes errors likely if you change something later. You can do the following for example:
SELECT CONCAT(german, " - ", english) As theResult FROM dictionary WHERE ID = X
Perfect! I was looking for something similar to your solution:
CONCAT and strTranslation = rowsfound.Columnat(1).StringValue
Would be even more convenient if one could use RowsFound.ColumnAt(1,2,4,6…).StringValue without CONCAT (like in LiveCode) allowing handling the result as an array, but I am fine with this.