Unknown column 'semi' in 'where clause'