Amigo, no me muestra error, pero no me borra el registro de la tabla generos, que tengo relacionada con las tablas.
Solo me borra el registro en musica y no en generos.
Código PHP:
<?php
$id = $_GET['id'];
//var_dump($idg);
$idg = isset($_POST["idg"])? $_POST["idg"]: '';
require ("funciones2.php");
$idc = conectar();
$sql = "SELECT * FROM generos WHERE idg=$idg";
$sql = "SELECT * FROM musica WHERE id=$id";
//$sql="SELECT * FROM musica m, generos g WHERE m.idg = g.idg";
$res = ejecutar($sql,$idc);
$fila = getRegistro ($res);
$sql = "DELETE FROM generos WHERE idg=$idg";
$sql = "DELETE FROM musica WHERE id=$id";
//$sql = "DELETE generos FROM generos g, musica m WHERE g.idg = m.idg";
$res = ejecutar($sql,$idc);
//$sql = "SELECT * FROM musica WHERE id=$id";
// $sql = "SELECT * FROM musica WHERE id=$id";
//$sql = "SELECT * FROM musica WHERE id=$id";
//$res = ejecutar($sql,$idc);
//$fila = getRegistro ($res);
//$sql = "DELETE FROM musica WHERE id=$id";
// $sql = "DELETE FROM musica WHERE id=$id";
//$sql = "DELETE FROM musica WHERE id=$id";
//$res = ejecutar($sql,$idc);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Sistema de rock</title>
<link href="formato1.css" rel="stylesheet" type="text/css" />
</head>
<body>
<?php
if ($res)
echo "ELIMINACIÓN EXITOSA";
else
echo "ERROR";
?>
<br/>
<br/>
</body>
</html>
<?php
cerrar ($idc);
?>