Zapytanie: SELECT * , (SELECT nazwa FROM `strona_wpisy_repozytorium` WHERE t1.id = id_wpisy AND pozycja=1 LIMIT 1) as nazwa_obrazu, (SELECT nazwa_pliku FROM `strona_wpisy_repozytorium` WHERE t1.id = id_wpisy AND pozycja=1 LIMIT 1) as nazwa_pliku FROM `strona_wpisyex` t1 WHERE t1.id_kategorii= AND t1.autoryzacja = 1 AND id_rodzic = 0 ORDER BY t1.pozycja LIMIT 0,15 --- parametry: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'AND t1.autoryzacja = 1 AND id_rodzic = 0 ORDER BY t1.pozycja...' at line 8#0 /var/www/clients/client2/web6/web/DUX-PROMOTION/workspace/models/wpisy.php(215): simpleMySQL->query('\n\t\t\tSELECT \n\t\t\t...') #1 /var/www/clients/client2/web6/web/DUX-PROMOTION/controllers/w/index.php(285): Wpisy->pobierzWszystkoLimit(15, 0) #2 /var/www/clients/client2/web6/web/DUX-PROMOTION/index.php(195): require_once('/var/www/client...') #3 {main}