I'm trying to programmatically generate team pages, and right now I'm getting weird results. Here's a code snippet from my implementation of hook_menu():
$query = db_query("SELECT tid, name FROM {dm_teams_info}");
while($entry = db_fetch_array($query)) {
$items[] = array(
'path' => 'teams/' . $entry['tid'],
'title' => t($entry['name']),
'callback' => 'dm_teams_teampage',
'type' => MENU_CALLBACK,
);
}
Basically, it takes all of the teams and calls dm_teams_teampage whenever the URL teams/{tid} is called (tid being a number). Right now, dm_teams_teampage simply returns the team number (using arg(1)).
I have three test teams in the DB with tid's 1, 2, and 3. When I call ./teams/1, everything works; ./teams/2 says page not found; ./teams/3 says access denied. Any ideas what's causing this error? Can multiple paths not have the same callback? Thanks!