Mounarajan Mounarajan - 1 year ago 111
MySQL Question

inserting array values to mysql throws error

I am inserting array values to mysql but it throws some error.

Could not find where does the error occured and where is the error.


TypeError: 'Connection' object does not support indexing

Where is the error and what is the fix?

Answer Source

Your db variable contains a Connection object instance. This Connection objects are not indexable, so db[0]....db[n] will not provide any values to be inserted in the SQL query.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download