select zadost.*,cenik.jar_ozim,LEFT(cenik.dalsirozde,1) as BIO,
 IF(DATE(datumodber)<"1988-12-12",null,datumodber) as datumodberX,
 IF(DATE(datumrozho)<"1988-12-12",null,datumrozho) as datumrozhoX,
 IF(DATE(datum2)<"1988-12-12",null,datum2) as datum2X,
 IF(DATE(SLONAUKZUZ)<"1988-12-12",null,SLONAUKZUZ) as slonaukzuzX,
 IF(DATE(datumzk)<"1988-12-12",null,datumzk) as datumzkX,
 doklady.Id as jeulc from zadost
 LEFT JOIN cenik ON (cenik.nomenkla=zadost.nomenkla)
 LEFT JOIN doklady ON (doklady.typ = 19 AND doklady.cislodokladu = zadost.ULC)

 where 1=1
 AND stredisko = '11'
 AND rok = '2025'
 AND dpodnik = '2194'

