Using select with Sqlite

Hello to everyone.
I am doing an app where i have a listview, when i pick one item i place two fields in 2 textboxes. Now i need to fetch ,from another table, several records using one of the textboxes, something like:

SELECT FIELD2,FIELD3 FROM TABLE2 WHERE FIELD1 = TEXTBOX1 ORDER BY FIELD2;

Where TEXTBOX1 is one of the fields obtained from the listview(AfterPicking).
Someone has an idea or an example?
I am using SQLITE.
Thank you.

WHERE FIELD1 = Listview.Selection

which sqlite extension are you using?
Let me recommend my sqlite extension, which follows the KISS principle - keep it simple, stupid

Taifun

Taifun, thamk you for your help.
I am using the extension SimpleSqlite.
I understand what you say, but in my Listview there are 2 fields.

Should be something like this?

Any example of those 2 fields?
How are they separated? By space? By comma? Something else?
Use the split block from the text drawer to split the 2 fields and select the one you need for the query

Taifun

Taifun:
They are separated by commas. As a matter of fact i have already separated both two fields, they are Textbox1 and Textbox2, i need to use Textbox2 as a parameter in order to read from the second table. How do i do this?

as @TIMAI2 already showed you,
you only have to replace Listview1.Selection by Textbox2.Text
protip: do the tutorials to learn the basics!

Taifun

Dear Taifun:
I did what i understood and it did not work.
Here are my blocks, please tell me what i am missing.
Thank you.

You are missing the listfixer block in both your queries: