Indico 3.3.2 indico db prepare syntax error

Duplicate of this thread, where I posted the solution: Problem migrating from 2.3.5 to 3.3.1 - #2 by ThiefMaster