FREEPBX-7388 #close - fix db syntax error