Hallo. Ich möchte gerne per Klick auf einen Löschen-Link einen Datensatz aus einer Tabelle löschen. Dazu habe ich folgendes Script erstellt:
buch löschen:
<?
$host = "localhost";
$user = "root";
$password = "";
$dbname = "romina_buecherliste";
$tabelle ="romina_buchtabelle";
mysql_connect($host, $user, $password);
mysql_select_db('$dbname');
mysql_query("delete * from $tabelle where id = '$_POST[id]' ") or die(mysql_error()) ;
$result=mysql_query($mysql_del);
if($result == 1){ echo "Wurde gelöscht";}
if($result <> 1){ echo "Wurde nicht gelöscht";}
?>
Leider erhalte ich dabei immer die Fehlermeldung
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 '* from romina_buchtabelle where id = ''' at line 1
kann mit der allerdings nicht wirklich viel anfangen. Woran könnte das Problem liegen?