# Need help with Function node to SQL Database

**URL:** https://discourse.nodered.org/t/need-help-with-function-node-to-sql-database/101225
**Category:** General
**Created:** [8 June 2026 17:41 UTC](https://discourse.nodered.org/t/need-help-with-function-node-to-sql-database/101225 "2026-06-08T17:41:17Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![ss1012](https://avatars.discourse-cdn.com/v4/letter/s/e19adc/32.png) [@ss1012](https://discourse.nodered.org/u/ss1012)
#### Post date: [8 June 2026 17:41 UTC](https://discourse.nodered.org/t/need-help-with-function-node-to-sql-database/101225/1 "2026-06-08T17:41:17Z")

</div>

![Current flow](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/7/3/73c55f7f00aa906ed41fbe538c9c4b5a959c0179.png)  
I would also like to send a time stamp to the SQL database.

---

<div class="post-metadata">

### Author: ![dynamicdave](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dynamicdave/32/96_2.png) [@dynamicdave](https://discourse.nodered.org/u/dynamicdave)
#### Post date: [8 June 2026 17:53 UTC](https://discourse.nodered.org/t/need-help-with-function-node-to-sql-database/101225/2 "2026-06-08T17:53:51Z")

</div>

Can you share your NR flow as it looks as if you have an error in your function node?  
The schema for your MySQL dB would also be useful to see.

---

<div class="post-metadata">

### Author: ![ss1012](https://avatars.discourse-cdn.com/v4/letter/s/e19adc/32.png) [@ss1012](https://discourse.nodered.org/u/ss1012)
#### Post date: [8 June 2026 17:56 UTC](https://discourse.nodered.org/t/need-help-with-function-node-to-sql-database/101225/3 "2026-06-08T17:56:29Z")

</div>

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/e/5/e53d5a604621c37f831b0522fcd48322020d285d.png)

---

<div class="post-metadata">

### Author: ![ss1012](https://avatars.discourse-cdn.com/v4/letter/s/e19adc/32.png) [@ss1012](https://discourse.nodered.org/u/ss1012)
#### Post date: [8 June 2026 18:01 UTC](https://discourse.nodered.org/t/need-help-with-function-node-to-sql-database/101225/4 "2026-06-08T18:01:39Z")

</div>

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

---

<div class="post-metadata">

### Author: ![jbudd](https://avatars.discourse-cdn.com/v4/letter/j/5f8ce5/32.png) [@jbudd](https://discourse.nodered.org/u/jbudd)
#### Post date: [8 June 2026 18:05 UTC](https://discourse.nodered.org/t/need-help-with-function-node-to-sql-database/101225/5 "2026-06-08T18:05:42Z")

</div>

> [@ss1012](#):
>
> I would also like to send a time stamp to the SQL database.

What do you mean by a timestamp?  
The simplest way to record when a record was created is to have a datetime field with a default value of now().  
That way your Node-red code does not need to handle it at all.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)
#### Post date: [22 June 2026 18:05 UTC](https://discourse.nodered.org/t/need-help-with-function-node-to-sql-database/101225/6 "2026-06-22T18:05:55Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
