finding data in field
Robert Mann
robmann at gp-racing.com
Sat Jan 6 15:32:51 EST 2007
Yes
global gfields, gtable,gdbresult, gnewname
local tcolname, tcolnames, tline, numrecord, theSQL, FirstcurID, colnum,
theSQL2, secondcurID,tncolnames, colnum2, tnewcolname, tcolvalues
-----Original Message-----
From: use-revolution-bounces at lists.runrev.com
[mailto:use-revolution-bounces at lists.runrev.com] On Behalf Of Joe Lewis
Wilkins
Sent: Saturday, January 06, 2007 3:28 PM
To: How to use Revolution
Subject: Re: finding data in field
Rob, I assume you have declared ALL of the globals in the handler?
On Jan 6, 2007, at 12:15 PM, Robert Mann wrote:
> 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
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
_______________________________________________
use-revolution mailing list
use-revolution at lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
More information about the use-livecode
mailing list