CRAFTERCMS-650

Fixed SQL syntax error