Displaying 2 results from an estimated 2 matches for "first_seen".
Did you mean:
first_seek
2006 Jun 23
0
Newbie: where to put input validation and model aggregations
...;TIMESTAMP" columns as dates or present the results as
simple aggregations ... where/how is the best way to specify this:
model, controller, or view?
For example, if I have a table that is something like:
"t TIMESTAMP, event VARCHAR"
and I would like the output to look like:
"first_seen, last_seen, count, event"
which would be constructed from a SQL query like:
"SELECT min(t) as first_seen, max(t) as last_seen, count(1) as count,
event FROM mytable GROUP BY event"
how should I structure my models? Should I have 2 models, 1 for the raw
and one for the aggregate (b...
2006 Jul 26
15
Rails without a primary key
I''ve been trying to use Rails on a database where the biggest
datawarehouse-style table doesn''t have a primary key. It really
doesn''t make sense and just adds extra unnecessary space. I do have,
however, a column that I normally use to search on (IP) that returns
many rows. The table also references several other tables through
rails-friendly foreign keys.
Simple AR