0
I have a movie ranking system on my website and I need it NAY show how many users recommended such a movie, here’s my code :
$query = "SELECT DISTINCT filmes, count(filmes) FROM filmes_rec
GROUP by filmes
ORDER by count(filmes) DESC LIMIT 10";
$result = mysqli_query($link, $query);
while($row = mysqli_fetch_row($result)) {
foreach($row as $field => $value) {
echo '<hr class="break"><tr><p class="title">' . htmlspecialchars($value) . '</p></tr>';
}
}
To solve this, just put index in value and show only values with the indexes you want. in case,
$field
is your index...– Ivan Ferrer