# Get the fields from database

**URL:** <https://www.ruby-forum.com/t/get-the-fields-from-database/178226>\
**Category:** Ruby\
**Created:** [October 31, 2009, 7:21am UTC](https://www.ruby-forum.com/t/get-the-fields-from-database/178226 "2009-10-31T07:21:02Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![dboz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/dc4da7/32.png) [@dboz](https://www.ruby-forum.com/u/dboz)\
**Post date:** [October 31, 2009, 7:21am UTC](https://www.ruby-forum.com/t/get-the-fields-from-database/178226/1 "2009-10-31T07:21:02Z")

</div>

My table name is pbook, in this i have lot fields ( 15 fields { name,  
homeno, pnoheno, mobileno, buisnessno, address, city, state),

I have to implement the search facility, if the i type a pattern it  
should fetch the records from database, it should display the matched  
records.

but my requirement is if my pattern match with atleast one field in  
pbook table it should display the records.

give me a query. awaiting reply.

Thx in advance,  
Manju.A.

---

<div class="post-metadata">

**Author:** ![dboz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/dc4da7/32.png) [@dboz](https://www.ruby-forum.com/u/dboz)\
**Post date:** [October 31, 2009, 8:37am UTC](https://www.ruby-forum.com/t/get-the-fields-from-database/178226/2 "2009-10-31T08:37:42Z")

</div>

Ror Ruby wrote:

> My table name is pbook, in this i have lot fields ( 15 fields { name,  
> homeno, pnoheno, mobileno, buisnessno, address, city, state),
> 
> I have to implement the search facility, if the i type a pattern it  
> should fetch the records from database, it should display the matched  
> records.
> 
> but my requirement is if my pattern match with atleast one field in  
> pbook table it should display the records.
> 
> give me a query. awaiting reply.
> 
> Thx in advance,  
> Manju.A.

ruby is a programming language. Some people write programs using ruby,  
and then they let other people use their programs. If you have a  
question about one of those programs, you need to:

1. Email the authors of the program and ask them your question.

or

1. Find a place where other people who use the same program hang out and  
discuss issues and problems they have while using the program.
