So I'm trying to add some tech-based bonuses to some improvements using SQL (which is much better than XML): That's working fine. However, if a different mod is already adding something like this, I wouldn't want my mod to do it as well. So, what I want to surround this statement with is something like: IF (DB.Query(SELECT COUNT(*) FROM Improvements_TechYieldChanges) < 2) THEN ... ENDIF However, I can't get that (or anything else I've tried) working. There's no real standard I can find for SQL IF statements, and none of the combinations I am trying work. Does anyone know how this works?