Unknown column 'pub2' in 'where clause'