Hallo zusammen,
ich möchte einen Datensatz in einer MySQL-Datenbank löschen.
Als Suchkriterium nehme ich eine Wert - und zwar persID:
Ich bekomme nun die folgende Fehlermeldung - kann den Fehler aber nicht finden:
In Zeile 21 befindet sich der oben genannte Quellcode - was mache ich hier falsch?
VG, David
ich möchte einen Datensatz in einer MySQL-Datenbank löschen.
Als Suchkriterium nehme ich eine Wert - und zwar persID:
PHP-Code:
$bid = $_GET['bid']; // Hier ist der entsprechende Wert auch korrekt gespeichert bzw. hinterlegt
$del_db = $bewerber->runQuery("DELETE FROM mails-verzoegert WHERE persID = $bid");
$del_db->execute();
Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[42000]:
Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL
server version for the right syntax to use near '-verzoegert WHERE persID = 9182' at line 1' in /var/www/htdocs/smart/html/pro.php:21
Stack trace: #0 /var/www/htdocs/smart1/html/smhr/qa-stop-pro.php(21): PDOStatement->execute() #1 {main} thrown in /var/www/htdocs/
smart/html/pro.php on line 21
Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL
server version for the right syntax to use near '-verzoegert WHERE persID = 9182' at line 1' in /var/www/htdocs/smart/html/pro.php:21
Stack trace: #0 /var/www/htdocs/smart1/html/smhr/qa-stop-pro.php(21): PDOStatement->execute() #1 {main} thrown in /var/www/htdocs/
smart/html/pro.php on line 21
VG, David
Kommentar