Ver original$resp = mysql_query($consulta,$BD);
Ver original$resp = mysql_query($consulta,$BD) or die(mysql_error());