Contents - Index


Seek (function)

Seek(sCode) : boolean

The Seek function enables you to quickly position your current table to a matching code. For the logs table, the "code" is the log ID.  This function is also a good way to test if a code is valid or already exists in a table. For example, using this function would allow you to quickly update information into the GSAK database using a tab delimited text file. Taking a simple tab delimited text file of two fields, first = code and the second = user data, the code to update this information into your database would go something like:
  

FileRead File=c:\temp\data.txt
$code = extract($line,chr(09),1)
if seek($code) # make sure code is valid before updating user data
   $d_userdata =  extract($line,chr(09),2)
endif   
EndRead


Note: For the "caches" table, seek only looks at your current filter of records. For all other tables, it only looks in your current "scope".

Alpha List         Category List