# Inserting records into MySQL using RoR

**URL:** <https://www.ruby-forum.com/t/inserting-records-into-mysql-using-ror/107046>\
**Category:** Rails\
**Created:** [June 17, 2007, 5:29am UTC](https://www.ruby-forum.com/t/inserting-records-into-mysql-using-ror/107046 "2007-06-17T05:29:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![randall](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/b38774/32.png) [@randall](https://www.ruby-forum.com/u/randall)\
**Post date:** [June 17, 2007, 5:29am UTC](https://www.ruby-forum.com/t/inserting-records-into-mysql-using-ror/107046/1 "2007-06-17T05:29:45Z")

</div>

Is it possible to insert records into a MySQL database by clicking on a  
link? I can do this with a form, but I see no tutorials, information on  
the internet that this is possible. I guess I am thinking along the  
lines of dynamically creating a link that would pass the values in a  
querystring. Can someone point me in the right direction?

---

<div class="post-metadata">

**Author:** ![randall](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/b38774/32.png) [@randall](https://www.ruby-forum.com/u/randall)\
**Post date:** [June 17, 2007, 5:43am UTC](https://www.ruby-forum.com/t/inserting-records-into-mysql-using-ror/107046/2 "2007-06-17T05:43:25Z")

</div>

You should be able to by using a similar method to create (in  
scaffold). Just use link\_to:

See [http://pastie.caboo.se/71146](http://pastie.caboo.se/71146)

On 6/17/07, Mike R. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Is it possible to insert records into a MySQL database by clicking on a  
> link? I can do this with a form, but I see no tutorials, information on  
> the internet that this is possible. I guess I am thinking along the  
> lines of dynamically creating a link that would pass the values in a  
> querystring. Can someone point me in the right direction?

–  
Ramon T.

---

<div class="post-metadata">

**Author:** ![randall](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/b38774/32.png) [@randall](https://www.ruby-forum.com/u/randall)\
**Post date:** [June 17, 2007, 5:11pm UTC](https://www.ruby-forum.com/t/inserting-records-into-mysql-using-ror/107046/3 "2007-06-17T17:11:50Z")

</div>

Ramon T. wrote:

> You should be able to by using a similar method to create (in  
> scaffold). Just use link\_to:
> 
> See [http://pastie.caboo.se/71146](http://pastie.caboo.se/71146)
> 
> On 6/17/07, Mike R. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:
> 
> > Is it possible to insert records into a MySQL database by clicking on a  
> > link? I can do this with a form, but I see no tutorials, information on  
> > the internet that this is possible. I guess I am thinking along the  
> > lines of dynamically creating a link that would pass the values in a  
> > querystring. Can someone point me in the right direction?
> 
> –  
> Ramon T.

Ramon,

```
 Thanks for the help. I'll give that a try.

```

Mike R.
