Sera a tutti,
ho un problema con uno script per la cancellazione di un elemento da un db.
Ho controllato e non vedo alcun errore. L'errore che viene stampato è:Codice PHP:
$sql = mysql_query("SELECT * FROM utenti WHERE id = '".$id."' ") or die (mysql_error()); $info = mysql_fetch_array($sql); $file = (int)$_GET['id']; $find = mysql_query("SELECT * FROM file WHERE id = '".(int)$_GET['id']."' ") or die (mysql_error()); $resrow = mysql_fetch_array($find); if($resrow['utente'] == $id){ $destroy = mysql_query("DELETE * FROM file WHERE id = '".(int)$_GET['id']."' ") or die (mysql_error());
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 file WHERE id = '6'' at line 1