Hi all,
Iām practicing (hands on class in PHP and I have problem with this code:
Class DBSQL
{
function showadmin($sql="")
{
$conn = $this->CONN;
$result = mysql_query($sql,$conn);
return $result;
}
}
$db = new DBSQL($DBName);
$showadminuser = "select adminid, username from
newsadmin";
$db->showadmin($showadminuser);
How can I do to get $result to continuous writing these line:
while ($row = mysql_fetch_array($result)){
$adminid=$row['adminid'];
$username=$row['username']; print "$username
";
}
Please show me, thanks men.