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

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

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.

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

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

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.

uups thanks …as i saied i’m new