MySQL error: Unknown column 'work' in 'where clause'