Código sql:
Ver original$query=
"SELECT *
FROM link
INNER JOIN name ON link.name = name.id
INNER JOIN director ON link.director = director.id
INNER JOIN genre ON link.genre = genre.id
INNER JOIN cast ON link.cast = cast.id
INNER JOIN date ON link.date = date.id
INNER JOIN url ON link.url = url.id"
OR die (mysql_error());
$result = mysql_query($query)
OR die (mysql_error());
$num=mysql_num_rows($result);
$i=0;
while ($i < $num)
{
$name=mysql_result($result,$i,"link.name");
$date=mysql_result($result,$i,"link.date");
$genre=mysql_result($result,$i,"link.genre");
$director=mysql_result($result,$i,"link.director") ;
$cast=mysql_result($result,$i,"link.cast");
$url=mysql_result($result,$i,"link.url");
echo "Movie: $name";
echo "<br>";
echo "Genre: $genre";
echo "<br>";
echo "Director: $director";
echo "<br>";
echo "Cast: $cast";
echo "<br>";
echo "Url: $url";
echo "<br>";
echo "Date: $date";
echo "<br>";
echo "<br>";
$i++;
}
es para una base de datos con la info de las pelis para mi colleccion
PD: ahora que me pongo a pensar capaz esta mal la variable del row no?
a esto despues le agrego un _get para el buscador
$search = empty($_GET['q'])? die ("<center>ERROR: Please enter a search criteria.</center>") : mysql_real_escape_string($_GET['q']);