Thank for the reply:
I think... I need to have MySQL making itself a calculation when I do a SELECT. The 4th columns values are from ANOTHER table, but the whole calculation of the query must be with the values of column3 etc.
###this will form a table (filled in my example: column 1,2,3...perhaps I'll need to change something here to)
put "SELECT isv_laik,atv_laik,atstum,vyksta FROM reisas where gal='"& sResaultSave & "'ORDER BY isv_laik" into tSQL
put revDataFromQuery(tab, cr, sDatabaseID, tSQL) into tData
put tData into field "ats"
### column 4. result can be also it the same field "ats"
put "select kaina from tarifai use index (tarifas) where (kg_nuo<'"& sGalutine1 &"' and '"& sGalutine1 &"'<=kg_iki) and (km_nuo<'" & tAtstum &"' and '"& tAtstum &"'<=km_iki)" into tSQL
put revDataFromQuery(tab, cr, sDatabaseID, tSQL) into tTest
put tTest & "Lt" into field "test"
tAtstum - this DB record value must be taken from a column 3 field with right row ID+ some calculations -attachment shot.
every time another result must be.
Somewhere there was mentioned about arrays or smthing, i didn't figured out

.
I will upload attachment.
Please help guys...