Moving to OOP hopefully!
- by Luke
So I am trying to understand OOP more and use it.
The following code was written before i started using OOP.
//loop through all the users
$game = "$_POST[Game]_teams";
$result = mysql_query("SELECT username FROM `users`") or die(mysql_error());
while( $row=mysql_fetch_assoc($result) )
{
$u[] = $row['username'];
}
I have put the query into my database page like following:
function selectAllUsers()
{
$q = "SELECT username FROM ".TBL_USERS."";
mysql_query($q, $this->connection);
}
I'm a little confused about how the rest could be different?
Would it be? Is it possible for anyone to help me without more code or understanding of my structure?