Unknown column 'kh_book.kategorie_id' in 'where clause': select distinct kh_bazar.book_id from kh_bazar,kh_book_autor,kh_autor where kh_bazar.bazar_typ=1 and kh_bazar.book_id=kh_book_autor.book_id and kh_book_autor.autor_id=kh_autor.autor_id and kh_book.kategorie_id=1 order by kh_autor.autor_jmeno