Displaying 7 results from an estimated 7 matches for "away_teams".
Did you mean:
away_team
2006 Mar 07
13
Active Record - Can''t figure out relationship.
...home_team_id int not null,
away_team_id int not null,
round tinyint(4) not null,
home_team_score tinyint(8) not null,
away_team_score tinyint(8) not null,
constraint fk_home_teams foreign key (home_team_id) references
teams(id),
constraint fk_away_teams foreign key (away_team_id) references
teams(id),
primary key (id)
);
And I need to be able to access this data through a join, ie I want to
be able to do things like:
@round1 = Round.get_round(1)
And then be able to access
@roind1.home_team_score
@round1.home_team.short_name
@round1.away_tea...
2007 Oct 16
8
Using multiple foreign keys in views
I have a model, Game, that has_many :teams. There''s a home team and an
away team. I created two foreign keys, so each game can have two teams
associated with it. Here''s the Team model:
class Team < ActiveRecord::Base
belongs_to :game,
:class_name => ''Game'', :foreign_key => ''hometeam_id''
belongs_to :game,
:class_name =>
2006 May 14
3
Strange Database Mapping Question
...except this one is for Rugby.
The relevant tables in my database are as follows:
create table teams (
id INT AUTO_INCREMENT NOT NULL,
name VARCHAR(40),
PRIMARY_KEY(id) );
create table games (
id INT AUTO_INCREMENT NOT NULL,
date DATETIME, #Date of game
home_teams_id INT, #id of home team
away_teams_id INT, #id of away team
home_team_score INT, #this is not meant to link to another table
away_team_score INT, #this is not meant to link to another table
PRIMARY_KEY (id) );
In this example the home and away team records in games are supposed to link
to a team record in teams.
In the models,...
2004 Nov 16
1
Samba Won't Work
I tried to get Samba running on my new Trustix installation all day
yesterday with no luck. I'm a newbie, so there's a lot I don't know yet.
At any rate, I have the Smb, nmbd, and smbd services running. I've got my
smb.conf file set up properly from what I can tell. When I try the following
command on my Linux box:
smbclient //192.168.1.102/backup -U jesse
I get the error,
2007 Jun 09
7
create 2 fk referencing the same table
Hi everyone! I have a problem with defining 2 fk referencing the same
table. I have a Program table and a Team table. The Program should
have an away team and a home team fk. From my understanding, "the fk
column should be named after the class of the target table, converted
to lowercase, with _id appended". But, in my case, I have 2 fk
referencing the same table. How can I do this?
2004 Aug 07
1
end_modal question
Really stupid question, but have you wrapped this all in an App class? If you don''t have a
wxApp subclass driving your applications then all sorts of badness would happen.
> I''m writing a custom little application for my boss''s high school
> football team to track there stats play by play.
>
> My problem is that when I start the application, it
2008 Oct 07
6
Hpricot loop question to read table row values
Hi.
I''ve got a file that contains a table that looks like this:
<table>
<tr><td>column title a</td><td>column title b</td></tr>
<tr><td>row 1 a</td><td>row 1 b</td></tr>
<tr><td>row 2 a</td><td>row 2 b</td></tr>
<tr><td>row 3 a</td><td>row 3