Hi all,

I am new to this subject and ruby. My question is related to accessing 
information from one database in order to pass it along to another. For 
example: I have a database called User with a column name 'CDV' (which is a 
code about 8 digits long?) and 'nat_ID_number' (8 digits long?) and another 
one called 'Electors' with the same column. The thing is that the User db 
is used to stored information from people who want to be affiliated to my 
application essentially making it empty in the beginning, while the other 
already has information stored in it.

So, when a new user is saved into the User db, he will be asked only to 
input the 'nat_id_number', then the idea is to use that input to go into 
the Elector db find the corresponding 'nat_ID_number' and then take the 
'CDV' information from this db to the original one (User).

My questions are as followed:

1) How can, using sequel, reference the Elector db? Is it through the 
'DB.from(:Elector)' ? And how can I access only the right column?  perhaps 
something like 'DB.from(:Elector[:nat_ID_number = :nat_ID_number])
2) Where would I put that code? In the User controller?
3) What would be the function call from sequel to pass information from one 
to the other? Something like the last code at the bottom perhaps?

Thanks in advanced

User.where(:CDV, NULL).update(:CDV => 'CDV') 

-- 
You received this message because you are subscribed to the Google Groups 
"sequel-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sequel-talk.
For more options, visit https://groups.google.com/d/optout.

Reply via email to