# Load data from database \> open-flash-chart

**URL:** <https://www.ruby-forum.com/t/load-data-from-database-open-flash-chart/146880>\
**Category:** Rails\
**Created:** [August 26, 2008, 1:30pm UTC](https://www.ruby-forum.com/t/load-data-from-database-open-flash-chart/146880 "2008-08-26T13:30:27Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![remco](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/9d8465/32.png) [@remco](https://www.ruby-forum.com/u/remco)\
**Post date:** [August 26, 2008, 1:30pm UTC](https://www.ruby-forum.com/t/load-data-from-database-open-flash-chart/146880/1 "2008-08-26T13:30:27Z")

</div>

Hi,

I use the plugin open-flash-chart

[http://pullmonkey.com/2008/1/4/open-flash-chart-plugin-for-ruby-on-rails-1-9-6-release](http://pullmonkey.com/2008/1/4/open-flash-chart-plugin-for-ruby-on-rails-1-9-6-release).

The data of my swf is fetched from my controller

def y\_right  
g.set\_data([46,28,33,48,54,49,34,40,36,43,56,55,57,49,38,35,36,62,44,59,40,55,27,37,47])  
end

Question:

How can i fil in the g.set\_data from a database-table/column?

Grtz…remco

---

<div class="post-metadata">

**Author:** ![remco](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/9d8465/32.png) [@remco](https://www.ruby-forum.com/u/remco)\
**Post date:** [August 26, 2008, 4:10pm UTC](https://www.ruby-forum.com/t/load-data-from-database-open-flash-chart/146880/2 "2008-08-26T16:10:11Z")

</div>

> The data of my swf is fetched from my controller
> 
> def y\_right  
> g.set\_data([46,28,33,48,54,49,34,40,36,43,56,55,57,49,38,35,36,62,44,59,40,­55,27,37,47])  
> end
> 
> Question:
> 
> How can i fil in the g.set\_data from a database-table/column?

Your question is how to obtain an array of numbers from a database? I  
recommend reading an Active Record tutorial, or the Active Record  
section of a good Rails book.
