# MSQL Result Object

**URL:** <https://discourse.nodered.org/t/msql-result-object/954>\
**Category:** General\
**Created:** [20 June 2018 12:44 UTC](https://discourse.nodered.org/t/msql-result-object/954 "2018-06-20T12:44:25Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![fraser](https://avatars.discourse-cdn.com/v4/letter/f/6de8d8/32.png) [@fraser](https://discourse.nodered.org/u/fraser)\
**Post date:** [20 June 2018 12:44 UTC](https://discourse.nodered.org/t/msql-result-object/954/1 "2018-06-20T12:44:25Z")

</div>

I’m putting some data into a MySQL database - something I’ve done loads of times before - but with my current implementation I need to be able to return error data to a user. I seem to have what I need in the MySQL Result Object, but I can’t find a definition of what each field in the object actually means. Here is an example:

fieldCount: 0  
affectedRows: 1  
insertId: 67  
serverStatus: 2  
warningCount: 0  
message: “”  
protocol41: true  
changedRows: 0

So, I can have a good stab at “insertId” being the row inserted, “affectedRows” the sum of changed rows, but what is “serverStatus: 2” what would constitute a warning? What could I expect as a message? I can’t find anything to clearly defined this anywhere on the Internet, only a few examples of what I might expect, with little to no explanation. Does anyone have any suggestions?

---

<div class="post-metadata">

**Author:** ![ukmoose](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ukmoose/32/13_2.png) [@ukmoose](https://discourse.nodered.org/u/ukmoose)\
**Post date:** [20 June 2018 13:35 UTC](https://discourse.nodered.org/t/msql-result-object/954/2 "2018-06-20T13:35:00Z")

</div>

see [https://dev.mysql.com/doc/dev/mysql-server/latest/mysql\_\_com\_8h.html#a1d854e841086925be1883e4d7b4e8cad](https://dev.mysql.com/doc/dev/mysql-server/latest/mysql__com_8h.html#a1d854e841086925be1883e4d7b4e8cad) for server status explanation
