tags:

views:

34

answers:

1

Not sure if I can ask two questions?

If i run the following function in my database class

function generateUserArray() 
{
    $u = array();
    $result = $this->selectAllUsers();
    while( $row=mysql_fetch_assoc($result)) 
    {
         $u[] = $row['username'];
    }
    return $u;
}

Would i call it like this?

        $u[] = $datebase->generateUserArray();

My second question, will this work:

        else if($database->addLeagueInformation($subname, $subformat, $subgame, $subseason, $subwindow, $subadmin, $subchampion, $subtype)
                                            && $databases->addLeagueTable($name) && $_SESSION['players'] == $subplayers && $comp_name =     
                                            "$format_$game_$name_$season" && $_SESSION['comp_name'] = $comp_name)

Thankyou

+2  A: 
  1. I think you meant

    $u = $datebase->generateUserArray();

  2. I think you meant:

    $comp_name == "$format_$game_$name_$season" && $_SESSION['comp_name'] ==$comp_name

The rest looks ok

nc3b