# Small doubt HELP me

**URL:** <https://www.ruby-forum.com/t/small-doubt-help-me/159412>\
**Category:** Rails\
**Created:** [February 4, 2009, 11:31am UTC](https://www.ruby-forum.com/t/small-doubt-help-me/159412 "2009-02-04T11:31:38Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![lookshankar](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/7bcc69/32.png) [@lookshankar](https://www.ruby-forum.com/u/lookshankar)\
**Post date:** [February 4, 2009, 11:31am UTC](https://www.ruby-forum.com/t/small-doubt-help-me/159412/1 "2009-02-04T11:31:38Z")

</div>

Hi ,

```
I have table like this
 ---------------------------------------------------------------
|id | what | when | color | to | description |

```

* * *

## 1 | test |2009-02-01 | red |2009-02-15 | hi this is test |

## 2 | test2 |2009-02-02 | green |2009-02-14 | hi this is test |

---

<div class="post-metadata">

**Author:** ![lookshankar](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/7bcc69/32.png) [@lookshankar](https://www.ruby-forum.com/u/lookshankar)\
**Post date:** [February 4, 2009, 11:37am UTC](https://www.ruby-forum.com/t/small-doubt-help-me/159412/2 "2009-02-04T11:37:14Z")

</div>

not only that you haven’t given your post a good title (“Help me” says  
nothing), but you didn’t even specify your question or problem in your  
post.

---

<div class="post-metadata">

**Author:** ![lookshankar](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/7bcc69/32.png) [@lookshankar](https://www.ruby-forum.com/u/lookshankar)\
**Post date:** [February 4, 2009, 12:23pm UTC](https://www.ruby-forum.com/t/small-doubt-help-me/159412/3 "2009-02-04T12:23:41Z")

</div>

And?

Blog: [http://random8.zenunit.com/](http://random8.zenunit.com/)  
Learn rails: [http://sensei.zenunit.com/](http://sensei.zenunit.com/)

On 04/02/2009, at 9:31 PM, Shankar G.  
\<removed\_email\_address@domain.invalid

---

<div class="post-metadata">

**Author:** ![lookshankar](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/7bcc69/32.png) [@lookshankar](https://www.ruby-forum.com/u/lookshankar)\
**Post date:** [February 4, 2009, 5:07pm UTC](https://www.ruby-forum.com/t/small-doubt-help-me/159412/4 "2009-02-04T17:07:32Z")

</div>

What do you mean by “I have table like this”? is an ASCII table and  
you want to parse it and generate the output, or you have a table like  
that in your data base?

On Feb 4, 10:31 am, Shankar G. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![lookshankar](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/7bcc69/32.png) [@lookshankar](https://www.ruby-forum.com/u/lookshankar)\
**Post date:** [February 5, 2009, 4:33am UTC](https://www.ruby-forum.com/t/small-doubt-help-me/159412/5 "2009-02-05T04:33:34Z")

</div>

Hi all,

```
 My apologies for posting a small amount of data, there was some 

```

mistake in posting this post.You can see the full post of the forum here  
[Small doubt HELP me - Rails - Ruby-Forum](http://www.ruby-forum.com/topic/177617#777504). Thanks for all your  
response.

Cheers,  
Shankar.

---

<div class="post-metadata">

**Author:** ![lookshankar](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/7bcc69/32.png) [@lookshankar](https://www.ruby-forum.com/u/lookshankar)\
**Post date:** [February 5, 2009, 6:34am UTC](https://www.ruby-forum.com/t/small-doubt-help-me/159412/6 "2009-02-05T06:34:03Z")

</div>

Hi Shankar,

It would help if you explained where exactly you want that kind of  
output.  
In the views?  
and by “2009-02-12=\>” you mean the query to the DB should be based on  
the ‘when’ field?

On Feb 5, 8:33 am, Shankar G. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![lookshankar](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/7bcc69/32.png) [@lookshankar](https://www.ruby-forum.com/u/lookshankar)\
**Post date:** [February 5, 2009, 2:41am UTC](https://www.ruby-forum.com/t/small-doubt-help-me/159412/7 "2009-02-05T02:41:48Z")

</div>

He means the content of his SQL table represented as ASCII was as he  
had it.

Blog: [http://random8.zenunit.com/](http://random8.zenunit.com/)  
Learn rails: [http://sensei.zenunit.com/](http://sensei.zenunit.com/)

On 05/02/2009, at 3:06 AM, Miguel R. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![lookshankar](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/7bcc69/32.png) [@lookshankar](https://www.ruby-forum.com/u/lookshankar)\
**Post date:** [February 5, 2009, 6:37am UTC](https://www.ruby-forum.com/t/small-doubt-help-me/159412/8 "2009-02-05T06:37:34Z")

</div>

Ram,

```
Thanks for your help dude.Yes, I would like to have the output in 

```

the ‘view’ and the value should be fetched based on ‘when’ and ‘to’  
fields.

cheers,  
shankar.
