Quantcast
Viewing all articles
Browse latest Browse all 75251

SQL/Macro Code Wanted to set macro flag if... by clyde - 2013-09-15

QUOTE (hynr @ September 16, 2013 01:09 am)
I have a follow-up to this (in my case I do prefer SQLite code rather than other macro commands) for a macro that I am currently working on: once the above macroflag is set in the current database, my next step is to then set this filter
GSK
mfilter where=macroflag and not found
and for just those caches copy to the current database those logs that are the ones which are setting the found status in the Found database.

It seems that this could be a one-line SQLite update on the logs table with the above shown attachment, but I am a bit too chicken to simply go experiement on my main database since I am currently traveling. So I would love some advice on what might work.

(This is relevant because the API does not send your own found logs the way PQs do, so I have tons of records which are missing relevant found logs by myself and/or my caching partner; but they are in our Founds databases).

Assuming the other database is already attached (in my example I have used the name "OtherDb") then I think the code would go something like:

GSK
$status = sqlite("sql","replace into logs select * from OtherDb.logs where g_FoundLog(OtherDb.logs.ltype) and OtherDb.logs.lIsowner and OtherDb.logs.lparent in (select code from caches where macroflag and not found)")
resynclogs

Viewing all articles
Browse latest Browse all 75251

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>