Unknown column 'capital' in 'where clause'