Note that the SQL statement would be tainted as soon as you interpolate tainted variables into it.
In reply to Re^3: Counting rows Sqlite by Corion in thread Counting rows Sqlite by fanticla