Home php Error “Column count doesn't match value count at row 1”

Error “Column count doesn’t match value count at row 1”

Author

Date

Category

An error occurs while adding an entry to the database, can someone help fix it?

Error:

ћWITH€ ± є ° їWITHЂѕWITHЃ°: Column count doesn't match value count at row 1

Add code:

$ result = mysql_query ("INSERT INTO` logdb`.`logtable` (`25i`,` 658c`, `2sy `,` 2st`, `66t`) VALUES ('". $ I25. "', '". $ C658. "', '". $ Sy2. "', '". $ St2. "', '" . $ t66. "','". $ in25. "')") or die ("Query errors:". mysql_error ());

I encrypt the data in RSA variables, I suspect that the error occurs due to the occurrence of \ t \ n after encryption.


Answer 1, authority 100%

You have 5 columns:

(25i, 658c, 2sy, 2st, 66t)

and values ​​to insert 6:

('". $ i25."', '". $ c658."', '". $ sy2." ',' ". $ st2." ',' ". $ t66." ',' ". $ in25." ')

Accordingly, you get an error – the number of columns does not match the number of values.

You seem to have forgotten to specify the 25in ($ in25 ) column:

(25i, 658c, 2sy, 2st, 66t, 25in)

Programmers, Start Your Engines!

Why spend time searching for the correct question and then entering your answer when you can find it in a second? That's what CompuTicket is all about! Here you'll find thousands of questions and answers from hundreds of computer languages.

Recent questions