MSQL Result Object

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?

see for server status explanation

1 Like