Le he puesto lo que me pediste para ver si es ahi donde ocurre el error y diferenciarlos.
Código PHP:
$queryArchivosDelProyecto = @mysql_query("SELECT * FROM archivos WHERE id = $id LIMIT 1 ") or die("error al ejecutar el select".mysql_error());
$sql = @mysql_query("DELETE FROM archivos WHERE id = $id ") or die("error al ejecutar el delete".mysql_error());
Pero sigue marcando el mismo somero 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 '1' at line 1