Chyba v dotazu: SELECT prilohy_kalendar.prilohy_id,prilohy.jmeno FROM prilohy_kalendar LEFT JOIN prilohy ON prilohy_kalendar.prilohy_id=prilohy.id WHERE prilohy_kalendar.kalendar_id=prot ORDER BY prilohy_kalendar.prilohy_id ASCUnknown column 'prot' in 'where clause'