Skip to content
Advertisement

How to insert database mysql. Solve?

How can I insert the file data into the table mysql?

code:

Erros:

our:

How to solve this error and be able to insert the data in the mysqldb table?

myseq:

expected exit Output:

mysqldb

Solve?

Advertisement

Answer

You must carefully match the columns, the placeholders, and the values so that there is an identical number of each:

Note how there’s 5 columns specified, 5 placeholders, and 5 binds in the tuple now. You had an extra %s.

Conceptually what you want to do is:

Note that these must correlate 1:1:1 exactly. Any mismatches will result in errors like you’ve seen.

User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement