Philip has given good links.

Basically all the database related stuffs are handled by the Active Record
class which is one
of the components of MVC(Model View Controller) architecture.

Rails handles the create record stuff the same way traditional programming
languages such
as C++ via new constructor.

If you want to add a new employee detail record the statement would be

emp1 = emp.new(:name=>"amala", :website=>"http://www.tamil.net";, :email=>"
[email protected]")
emp1.save

or

emp.new(:name=>"amala", :website=>"http://www.tamil.net";, :email=>"[email protected]
").save

The fantastic feature of ROR is, mostly you dont need to know SQL query
language, or
you dont need to apply another Query language syntax.

The code becomes fantastically simple and readable from the functional point
of view.



On 23 June 2010 18:22, Philip Hallstrom <[email protected]> wrote:

>
> On Jun 23, 2010, at 10:13 AM, Ali Imran wrote:
>
> > In PHP from form
> >
> > we get values in POST OR GET
> >
> >
> > than I use mysql_query(insert_value)
> >
> > what is its equal in ROR
> >
>
> http://guides.rails.info/getting_started.html
> http://guides.rails.info/active_record_querying.html
>
> -philip
>
>
> > --
> > You received this message because you are subscribed to the Google Groups
> "Ruby on Rails: Talk" group.
> > To post to this group, send email to [email protected].
> > To unsubscribe from this group, send email to
> [email protected]<rubyonrails-talk%[email protected]>
> .
> > For more options, visit this group at
> http://groups.google.com/group/rubyonrails-talk?hl=en.
> >
>
> --
> You received this message because you are subscribed to the Google Groups
> "Ruby on Rails: Talk" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<rubyonrails-talk%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/rubyonrails-talk?hl=en.
>
>


-- 
-- 
Nandri(Thanks in Tamil),
Amala Singh

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to