Fatal error: Uncaught PDOException: 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 '' at line 1 in C:\xampp\htdocs\dodaj.php:27 Stack trace: #0 C:\xampp\htdocs\dodaj.php(27): PDO->query('SELECT * FROM `...') #1 {main} thrown in C:\xampp\htdocs\dodaj.php on line 27
a tu jest fragment kodu
{ $ksiazka['autor1'] = 'BRAK'; } else { //27 linijka $stmt = $db->query("SELECT * FROM `s_autor` WHERE id_autor = ".$_GET["j_autor"]); foreach($stmt as $row) { $ksiazka['autor1'] = $row['nazwisko_autora'].' '.$row['imie_autora']; $ksiazka['1autor'] = $row['id_autor']; }
Pomoże ktoś?