QUOTE (ian-and-penny @ September 15, 2013 03:13 am) |
With my Unfound database open, I would like to set some macro flags in the database if caches exist in both my Unfound and Found databases. |
This sets all macroflags in current database as follows: to True if the cache is in the Found database, False if not:
GSK |
$FoundDB="Found" #this needs to be the exact name of the Found Database $_SQL= "Attach Database '$_AppData\Data\$FoundDB\SQLite.db3' as FDB; " $_SQL=$_SQL+"Update caches set macroflag=(caches.code in (select code from FDB.caches));" $_SQL=$_SQL+"Detach Database FDB" $result = sqlite("sql",$_SQL) resync |