i am trying to run this program but unexpectedly the mysql_fetch_assoc() function is returning only the first entry even though there are many entries and further more in foreach loop error say that illegal 'parameter' username is given
<?php
$dbc=mysql_connect("localhost","root","nanu");
mysql_select_db('users');
$getQuery='SELECT * FROM userst ORDER BY username';
$result=mysql_query($getQuery,$dbc);
$rel=mysql_fetch_assoc($result);
echo'<pre>'.print_r($rel).'<pre/>';
echo"<br/>".$rel['username']."<br/>";
foreach($rel as $Query[]){
echo $Query['username'];
}
?>