I want to display 24 unique id's but he is only giving me 1: This is my php
<?php $sql = "SELECT id
FROM 15players
ORDER BY RAND()
LIMIT 24"; $result = mysql_query($sql) or die('Query failed: ' . mysql_error());
$row = mysql_fetch_array($result);
echo $row['id']; ?>
But if I execute this SQL in phpmyadmin, It returns me 24 id's So what am I doing wrong?
Aucun commentaire:
Enregistrer un commentaire