yes, mysql would handle this in most of the cases
good discovery for other databases though
On 3/21/06, Ugo Cei <ugo.cei@gmail.com> wrote:>
> Hi,
>
> excuse me if this is off-topic and feel free to ingore it in case.
>
> I''m using acts_as_taggable (the gem version) and found what to me
> looks like a bug in this code from the method tags_count:
>
> sql = "SELECT #{t}.#{t_pk} AS id, #{t}.name AS name, COUNT
> (*) AS count
> FROM #{jt}, #{o}, #{t} WHERE #{jt}.#{t_fk} = #{t}.#{t_pk}
> AND #{jt}.#{o_fk} = #{o}.#{o_pk}"
> sql << " AND
#{sanitize_sql(options[:conditions])}" if
> options[:condit
> ions]
> sql << " GROUP BY #{t}.name"
>
> My database (PostgreSQL 8) laments that the ''tags.id''
column should
> be in the "GROUP BY" clause, which seems reasonable to me. The
last
> line should be:
>
> sql << " GROUP BY #{t}.name, #{t}.#{t_pk}"
>
> It seems strange, however, that I''m the only one to be bitten by
this
> bug, so I wonder if maybe some other database (MySQL?) lets this pass.
>
> Ugo
>
>
> --
> Ugo Cei
> Blog: http://agylen.com/
> Open Source Zone: http://oszone.org/
> Evil or Not?: http://evilornot.info/
> Company: http://www.sourcesense.com/
>
>
> _______________________________________________
> Rails mailing list
> Rails@lists.rubyonrails.org
> http://lists.rubyonrails.org/mailman/listinfo/rails
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://wrath.rubyonrails.org/pipermail/rails/attachments/20060321/3474fc41/attachment-0001.html