kpb

Strona chwilowo niedostŕpna. Przepraszamy i zapraszamy pˇ╝niej

filmy

User a4_15 already has more than 'max_user_connections' active connections
SELECT repertuar.* , IF (doc_title IS NOT NULL , doc_title, tytul) doc_title, IF (doc_header IS NOT NULL , doc_header, opis) doc_header, IF ((data_premiery < CURDATE() - INTERVAL 7 DAY) ,'N','Y') premiera, preview, documents.adnotation, (SELECT MIN(DATA ) FROM baza4_15._repertuar AS rep WHERE 1 =1 AND rep.ID_film =films.film_id AND ID_kino = '3') AS first, -- (SELECT MIN(data) -- FROM baza4_15._repertuar -- WHERE 1=1 -- AND baza4_15._repertuar.ID_film=baza4_15._film.ID_film -- AND ID_kino='3') AS first, films.doc_id, films.film_id, films.film_show FROM (SELECT DISTINCT tytul, _film.id_film, IF (f.film_premiere_date IS NOT NULL AND f.film_premiere_date != '0000-00-00', film_premiere_date, data_premiery) data_premiery, opis, id_kino FROM baza4_15._repertuar LEFT JOIN baza4_15._film ON(_repertuar.id_film = _film.id_film) LEFT JOIN baza4_15.films AS f ON(f.film_id=_repertuar.id_film) WHERE 1=1 AND _repertuar.Data >= CURDATE() AND id_kino='3' ) repertuar LEFT JOIN baza4_15.films ON(films.film_id = repertuar.id_film) LEFT JOIN baza4_15.documents ON(films.doc_id=documents.doc_id) WHERE 1=1 AND repertuar.id_kino='3' AND id_kino = 'id_kino' ORDER BY tytul