Is there a length limit to $_sql?
I have the following code in my macro
Where $list is a comma separated list of GC-codes. This works nicely for a few dozen caches, but when I tried with a list of 318 codes I get the following error:
Note that $_sql is cut off in the middle of a GC code, causing the error.
I assume from this that there is a length limit to $_sql.
As my list will grow up to several thousand GC-codes I guess I'll have to find a different solution (setting the user flag for each code instead of adding it to the list).
I have the following code in my macro
GSK |
$_sql = "update caches set userflag = 1 where code in ($list)" $status = Sqlite("sql", $_sql) |
Where $list is a comma separated list of GC-codes. This works nicely for a few dozen caches, but when I tried with a list of 318 codes I get the following error:
QUOTE |
Error in Macro at line: 122 $status = Sqlite("sql", $_sql,"") Error=> SQLite Error 1 - near ")": syntax error $_Sql (string) =update Known.Caches set userflag = 1 where code in ('GC2C4WD','GC2N9N5','GC2Q4F1','GC2QYGB','GC2QZAN','GC2R06H','GC2R0AF','GC2R0JE','GC2R0JV','GC2R0XC','GC2R16N','GC2R17X','GC2R1AB','GC2R1G6','GC2QA4J','GC2QAY8','GC2QER7','GC2QY10','GC2QY4F','GC2QYJ1','GC2QZJJ','GC2PKPX','GC2QEC4','GC2QH07','GC2QQ0E','GC2QTW3','GC2QWGK','GC2QWM1','GC2QWQY','GC2QBGG','GC2QFW2','GC2QV4B','GC2QV5Q','GC2QV7V','GC2QVB0','GC2QVC5','GC2QVGH','GC2QWF4','GC2Q846','GC2QQC4','GC2QR7R','GC2QR8X','GC2QRNE','GC2QRXG','GC2 |
Note that $_sql is cut off in the middle of a GC code, causing the error.
I assume from this that there is a length limit to $_sql.
As my list will grow up to several thousand GC-codes I guess I'll have to find a different solution (setting the user flag for each code instead of adding it to the list).