Nie jestem orlem jezeli chodzi o SQL i nie potrafie rozwizac bledu skladniowego...
Wymodzilem takiego SQLa:
$stmt = $db->prepare('IF EXISTS(SELECT id FROM records WHERE name = ? AND disabled = ? AND type = ? LIMIT 1)' . '(UPDATE records SET content = ? WHERE name = ? AND disabled = ? AND type = ? LIMIT 1)' . '(INSERT INTO records(id, domain_id, name, type, content, ttl, prio, change_date, disabled) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?))');
I dostaje blad 42000 - 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 '(UPDATE records SET content = 'XXXXXXXX' WHER' at line 1
Czy ktos jest w stanie wytlumaczyc mi gdzie tu jest blad?