# How to insert multiple data into the correct field of mysql database

**URL:** <https://discourse.nodered.org/t/how-to-insert-multiple-data-into-the-correct-field-of-mysql-database/11139>\
**Category:** General\
**Created:** [15 May 2019 03:57 UTC](https://discourse.nodered.org/t/how-to-insert-multiple-data-into-the-correct-field-of-mysql-database/11139 "2019-05-15T03:57:44Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jimjiy](https://avatars.discourse-cdn.com/v4/letter/j/df788c/32.png) [@Jimjiy](https://discourse.nodered.org/u/Jimjiy)\
**Post date:** [15 May 2019 03:57 UTC](https://discourse.nodered.org/t/how-to-insert-multiple-data-into-the-correct-field-of-mysql-database/11139/1 "2019-05-15T03:57:44Z")

</div>

Hello, i am trying to insert multiple data into a mysql database but i am unable to insert them into the correct field here is my flow diagram

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/4/4a5f5ea0df891d28d709d41e6e75753a9b2b64c4.png)

here is how i've written my node function...

```auto
msg.topic="INSERT Into fire_contents (Temperature1) values(?)";
msg.payload=[msg.payload];
return msg;

```

(Temperature1,Temp2) and (?,?) would allow me to insert data into two columns  
but i dont understand how to insert the data into the correct columns or order

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [15 May 2019 10:46 UTC](https://discourse.nodered.org/t/how-to-insert-multiple-data-into-the-correct-field-of-mysql-database/11139/2 "2019-05-15T10:46:58Z")

</div>

Did you try a search of the forum to see if others have had similar questions? (hint hint)

---

<div class="post-metadata">

**Author:** ![Jimjiy](https://avatars.discourse-cdn.com/v4/letter/j/df788c/32.png) [@Jimjiy](https://discourse.nodered.org/u/Jimjiy)\
**Post date:** [15 May 2019 16:05 UTC](https://discourse.nodered.org/t/how-to-insert-multiple-data-into-the-correct-field-of-mysql-database/11139/3 "2019-05-15T16:05:39Z")

</div>

i checked but i didn't get through

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [15 May 2019 16:06 UTC](https://discourse.nodered.org/t/how-to-insert-multiple-data-into-the-correct-field-of-mysql-database/11139/4 "2019-05-15T16:06:55Z")

</div>

When you say "i checked but i didn't get through" what do you mean?

---

<div class="post-metadata">

**Author:** ![Jimjiy](https://avatars.discourse-cdn.com/v4/letter/j/df788c/32.png) [@Jimjiy](https://discourse.nodered.org/u/Jimjiy)\
**Post date:** [15 May 2019 16:37 UTC](https://discourse.nodered.org/t/how-to-insert-multiple-data-into-the-correct-field-of-mysql-database/11139/5 "2019-05-15T16:37:37Z")

</div>

Someone was doing something similar to what i was doing. He got a suggestion how to fix it put he didn't respond after the suggestion so i dont know if the problem was solved or not...

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [15 May 2019 16:44 UTC](https://discourse.nodered.org/t/how-to-insert-multiple-data-into-the-correct-field-of-mysql-database/11139/6 "2019-05-15T16:44:29Z")

</div>

did you try the suggesstion he got?

---

<div class="post-metadata">

**Author:** ![WesleyFranken](https://avatars.discourse-cdn.com/v4/letter/w/51bf81/32.png) [@WesleyFranken](https://discourse.nodered.org/u/WesleyFranken)\
**Post date:** [11 August 2020 15:53 UTC](https://discourse.nodered.org/t/how-to-insert-multiple-data-into-the-correct-field-of-mysql-database/11139/7 "2020-08-11T15:53:36Z")

</div>

Where can I find this post which propably will have the answer I need?

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [11 August 2020 18:59 UTC](https://discourse.nodered.org/t/how-to-insert-multiple-data-into-the-correct-field-of-mysql-database/11139/8 "2020-08-11T18:59:26Z")

</div>

Seeing that this thread is a year old, please opens new thread with your issue.

Meanwhile I’ll close this thread

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [11 August 2020 18:59 UTC](https://discourse.nodered.org/t/how-to-insert-multiple-data-into-the-correct-field-of-mysql-database/11139/9 "2020-08-11T18:59:31Z")

</div>


