# Table.find(@params\["tag"\])

**URL:** <https://www.ruby-forum.com/t/table-find-params-tag/68143>\
**Category:** Ruby\
**Created:** [September 9, 2006, 7:33pm UTC](https://www.ruby-forum.com/t/table-find-params-tag/68143 "2006-09-09T19:33:19Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![blacknight](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/c68b51/32.png) [@blacknight](https://www.ruby-forum.com/u/blacknight)\
**Post date:** [September 9, 2006, 7:33pm UTC](https://www.ruby-forum.com/t/table-find-params-tag/68143/1 "2006-09-09T19:33:19Z")

</div>

ok this gets all records from the table where the id = tag how do i  
change this for it to compare the “tag” with a other column apart from  
the id?? sorry for being such a noob but thats what i am

---

<div class="post-metadata">

**Author:** ![blacknight](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/c68b51/32.png) [@blacknight](https://www.ruby-forum.com/u/blacknight)\
**Post date:** [September 9, 2006, 8:28pm UTC](https://www.ruby-forum.com/t/table-find-params-tag/68143/2 "2006-09-09T20:28:51Z")

</div>

Ben W. wrote:

> ok this gets all records from the table where the id = tag how do i  
> change this for it to compare the “tag” with a other column apart from  
> the id?? sorry for being such a noob but thats what i am

Split the records into fields, compare the fields to each other:

table.each { |record|  
fields = record.split("\t") # assuming tabs as field separator  
print “Found it!” if fields[3] == fields[5]  
}

Maybe it would be more productive and educational if you posted your  
code  
and asked specific questions.

---

<div class="post-metadata">

**Author:** ![blacknight](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/c68b51/32.png) [@blacknight](https://www.ruby-forum.com/u/blacknight)\
**Post date:** [September 9, 2006, 8:32pm UTC](https://www.ruby-forum.com/t/table-find-params-tag/68143/3 "2006-09-09T20:32:16Z")

</div>

wel thanks …i am very new to all this

the code is:

def list  
table.find(@params[“tag”])  
end

thats all

i’ll have a look at wat you posted thanks

---

<div class="post-metadata">

**Author:** ![blacknight](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/c68b51/32.png) [@blacknight](https://www.ruby-forum.com/u/blacknight)\
**Post date:** [September 9, 2006, 8:35pm UTC](https://www.ruby-forum.com/t/table-find-params-tag/68143/4 "2006-09-09T20:35:18Z")

</div>

ok forgott “tag” is being sent via the url and i want to use it to get  
certain records from the db

---

<div class="post-metadata">

**Author:** ![blacknight](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/c68b51/32.png) [@blacknight](https://www.ruby-forum.com/u/blacknight)\
**Post date:** [September 9, 2006, 8:48pm UTC](https://www.ruby-forum.com/t/table-find-params-tag/68143/5 "2006-09-09T20:48:54Z")

</div>

On Sep 9, 2006, at 2:35 PM, Ben W. wrote:

> ok forgott “tag” is being sent via the url and i want to use it to get  
> certain records from the db

You are on the wrong mailing list my friend. You want the the Ruby on  
_Rails_ forum which can be found on the same site as you used to post  
here.

---

<div class="post-metadata">

**Author:** ![blacknight](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/c68b51/32.png) [@blacknight](https://www.ruby-forum.com/u/blacknight)\
**Post date:** [September 9, 2006, 8:50pm UTC](https://www.ruby-forum.com/t/table-find-params-tag/68143/6 "2006-09-09T20:50:15Z")

</div>

uups thanks …as i saied i’m new
