MySQL insert error : ER_BAD_FIELD_ERROR: Unknown column '2525' in 'field list'
I recently encountered a similar issue while trying to pass a parameter into a string in Node JS.
In the end, I was able to get a dynamic insertion into my MySQL database by using this line :
insertIntoNodeDirectory( '2', '"' + testMacAddress[0] + '"', '1');
This would enter the integer value 2, the string value contained in the testMacAddress array at index 0, and the integer value 1.
If i used this line: insertIntoNodeDirectory( '2', '" + testMacAddress[0] + "', '1');
without the additional single quotes around testMacAddress, the value inserted into the database was the string 'testMacAddress[0]'. Not what I wanted.