xaiborweb
Dseda
Programador
No recomendado
¡Usuario con pocos negocios! ¡Utiliza siempre saldo de Forobeta!
hola resulta que tengo una
tabla de enlaces con
[table="width: 500"]
[tr]
[th]id_movie[/th]
[th]url[/th]
[th]audio[/th]
[th]calidad[/th]
[/tr]
[tr]
[td]1[/td]
[td]enlace[/td]
[td]es[/td]
[td]hd[/td]
[/tr]
[tr]
[td]1[/td]
[td]enlace[/td]
[td]es[/td]
[td]dvd[/td]
[/tr]
[tr]
[td]1[/td]
[td]enlace[/td]
[td]la[/td]
[td]dvd[/td]
[/tr]
[tr]
[td]1[/td]
[td]enlace[/td]
[td]la[/td]
[td]cam[/td]
[/tr]
[tr]
[td]1[/td]
[td]enlace[/td]
[td]en[/td]
[td]cam[/td]
[/tr]
[/table]
y en otra tabla debe quedar todos los audios disponibles pero sin repetirse entre si (osea que no pase esto es|es) y la mejor calidad, ejemplo debería quedar así
[table="width: 500"]
[tr]
[th]id_movie[/th]
[th]content[/th]
[th]audio[/th]
[th]calidad[/th]
[/tr]
[tr]
[td]1[/td]
[td]content[/td]
[td]es|la|en[/td]
[td]hd[/td]
[/tr]
[/table]
hasta ahora obtengo todas las filas por el id_movie y las meti dentro de un while para ver todo
pero ahora no se como hacer con php para lograr el resultado que necesito, se agradece cualquier ayuda 😉
tabla de enlaces con
[table="width: 500"]
[tr]
[th]id_movie[/th]
[th]url[/th]
[th]audio[/th]
[th]calidad[/th]
[/tr]
[tr]
[td]1[/td]
[td]enlace[/td]
[td]es[/td]
[td]hd[/td]
[/tr]
[tr]
[td]1[/td]
[td]enlace[/td]
[td]es[/td]
[td]dvd[/td]
[/tr]
[tr]
[td]1[/td]
[td]enlace[/td]
[td]la[/td]
[td]dvd[/td]
[/tr]
[tr]
[td]1[/td]
[td]enlace[/td]
[td]la[/td]
[td]cam[/td]
[/tr]
[tr]
[td]1[/td]
[td]enlace[/td]
[td]en[/td]
[td]cam[/td]
[/tr]
[/table]
y en otra tabla debe quedar todos los audios disponibles pero sin repetirse entre si (osea que no pase esto es|es) y la mejor calidad, ejemplo debería quedar así
[table="width: 500"]
[tr]
[th]id_movie[/th]
[th]content[/th]
[th]audio[/th]
[th]calidad[/th]
[/tr]
[tr]
[td]1[/td]
[td]content[/td]
[td]es|la|en[/td]
[td]hd[/td]
[/tr]
[/table]
hasta ahora obtengo todas las filas por el id_movie y las meti dentro de un while para ver todo
PHP:
<?php
$servidor = 'localhost';
$db = 'db';
$u = 'root';
$p = '';
$con = mysqli_connect($servidor,$u,$p,$db);
$id_movie = '1';
$audios = mysqli_query($con,"SELECT audio FROM link_movies_en WHERE id_movie=$id_movie");
while ($audio = mysqli_fetch_row($audios)) {
echo $audio[0];
}
pero ahora no se como hacer con php para lograr el resultado que necesito, se agradece cualquier ayuda 😉
Última edición:

