Displaying 7 results from an estimated 7 matches for "away_team".
2006 Mar 07
13
Active Record - Can''t figure out relationship.
...not null auto_increment,
short_name varchar(12) not null,
long_name varchar(50) not null,
logo varchar(20) not null,
primary key (id)
);
create table rounds (
id int not null auto_increment,
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
t...
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
...d -a jesse, I get the error, "Segmentation fault",
and it doesn't add the user. This may be the cause of all my problem.
Any ideas what this means, or how I fix it? Remember, I'm a newbie, so I'll
need more details than usual.
Here's my smb.conf:
[global]
workgroup = AWAY_TEAM
server string = Trustix Secure Linux Samba Server
security = share
hosts allow = 192.168.1. 127.
log file = /var/log/samba/log.%I
#============================ Share Definitions
==============================
[homes]
comment = Home Directories
browseable = no
writable = yes...
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