Fixed #861: Bug -SQLSTATE[42000]: Syntax error or access violation