[Rails] Re: Grouping data for charting

2008-10-02 Thread ressister
Great suggestion Roy, thanks! I even added category_color for uncategorized entries in the SQL query you built. Take a look at the output though... [#Entry , #Entry , #Entry , #Entry , [#Entry ]] The 5th entry here is the uncategorized entry. It's in brackets which is tripping up Open Flash

[Rails] Re: Grouping data for charting

2008-10-02 Thread Pardee, Roy
How about supplementing what you're already getting back w/a call like this: @entries Entry.find_by_sql('select sum(entries.price) as sum_price, uncategorized as category_name from entries where id not in (select entry_id from entry_categories)') HTH, -Roy -Original Message- From: