finding data in field
Robert Mann
robmann at gp-racing.com
Sat Jan 6 15:15:35 EST 2007
This is the complete handler with some changes, still not working
put "SELECT "& gfields &" FROM " & gtable & ";" into theSQL
put revQueryDatabase(gdbresult, theSQL) into FirstcurID
put revNumberOfRecords(FirstcurID) into numrecord
put revDatabaseColumnCount(FirstcurID) into colNum
put "SELECT * FROM " & gnewname & ";" into theSQL2
put revQueryDatabase(gdbresult, theSQL2) into secondcurID
put revDatabaseColumnCount(secondcurID) into colNum2
IF numrecord > 0 THEN
REPEAT numrecord times
REPEAT with c = 1 to colNum
put revDatabaseColumnNames(FirstcurID, c)into tcolname
REPEAT with x = 1 to colnum2
put revDatabaseColumnNames(secondcurID,x)into tnewcolname
IF tcolname = tnewcolname THEN
put revDatabaseColumnNumbered(FirstcurID, c) into
tcolvalues
put tnewcolname into tcolnames
ELSE
find word tcolname in fld "fieldmatch"
put the foundline into tline
put item 1 of tline into tcolnames
put revDatabaseColumnNumbered(FirstcurID, c) into
tcolvalues
END IF
END REPEAT
--
END REPEAT
put tcolnames after fld "fieldtcolnames"
put tcolvalues after fld "fieldtcolvalues"
revMoveToNextRecord secondcurID
revMoveToNextRecord FirstcurID
IF the result = false THEN exit REPEAT
END REPEAT
END IF
Thanks
Rob
More information about the use-livecode
mailing list