Hello thanks to all who helped. I guess I skipped over the section on limiting has_many in the docs. That was what I needed. Some of you have asked for the make up of my tables and which database I'm using.
Database: mysql 4.0.21
Tables:
CREATE TABLE areas (
id int(11) NOT NULL auto_increment,
short_name varchar(10) NOT NULL default '',
long_name varchar(200) NOT NULL default '',
PRIMARY KEY (id),
KEY short_name (short_name)
) TYPE=MyISAM;
CREATE TABLE stats (
id bigint(20) unsigned NOT NULL auto_increment,
aid int(11) NOT NULL default '0',
uid int(11) NOT NULL default '0',
login_name varchar(15) NOT NULL default '',
full_name varchar(50) NOT NULL default '',
cpu int(11) NOT NULL default '0',
mem int(11) NOT NULL default '0',
conn int(11) NOT NULL default '0',
disk_blocks bigint(20) NOT NULL default '0',
procs int(11) NOT NULL default '0',
sess int(11) NOT NULL default '0',
month int(11) NOT NULL default '0',
year year(4) NOT NULL default '2004',
PRIMARY KEY (id)
) TYPE=MyISAM;
Again, thank you for your help.
rlb3
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.