Displaying 2 results from an estimated 2 matches for "t1_id".
Did you mean:
s1_id
2010 Jun 10
1
Can RMySQL be used for a paramterized query?
...ps the DBI could at some point in the future
> implement
> this feature.
>
I can connect, and execute a SQL query such as "SELECT id FROM my_table",
and display a frame with all the IDs from my_table. But I need also to do
something like "SELECT * FROM my_other_table WHERE t1_id = x" where 'x' is
one of the IDs returned by the first select statement. Actually, I have to
do this in two contexts, one where the data are not ordered by time and one
where it is (and thus where I'd have to use TSMySQL to execute something
like "SELECT record_datetime,valu...
2006 Jun 23
0
ActiveRacord::Base find does not support HAVING ?!
Hi,
I''m new to Ruby/Rails and trying to do something like:
options = {
:select=>''t1.*, count(c2)'',
:joins=> ''AS t1 LEFT JOIN t2 ON t1.ID=t2.t1_id'',
:group=> ''t1.id'',
:having=> "count(c2) = #{my_var}"
}
T1.find(:all,options)
But I got the following error:
ArgumentError in T1Controller#action1
Unknown key(s): having
lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/core_ext/hash/keys...