El error es:
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 '1' at line 1
Osea que esta por el '1' en la linea uno... eh aqui todo mi codigo php:
Código PHP:
<?php
require('conectar.php');
$Valor = $_POST['valor'];
$id = $_POST['valor2'];
$queryArchivosDelProyecto = @mysql_query("SELECT * FROM archivos WHERE id = $id LIMIT 1 ") or die(mysql_error());
$rowArchivosDelProyecto = mysql_fetch_array($queryArchivosDelProyecto);
$archivo=$rowArchivosDelProyecto['pURL'];
unlink($archivo);
$sql = @mysql_query("DELETE FROM archivos WHERE id = $id ") or die(mysql_error());
if (!mysql_query($sql,$con)) { die('Error: ' . mysql_error());
} else {
header("Location: proyecto ver02.php?NombreVariable=".$Valor);
}
?>