Jump to content

#1136 - Column count doesn't match value count at row 1


anggwaponi

Recommended Posts

hello all :) i would like to ask our moderators, as well, my fellow guest in here about the message i got after i issued a command.the scenario is i'm trying to insert data to an existing table but i got a result that says:#1136 - Column count doesn't match value count at row 1 and this is the command i have issued in the Run SQL query/queries:INSERT INTO dialer.DNC (`phone`)VALUES ( 72091, 73321, 73378, 112717) what is probably the cause of the error? and what is the right command i'm going to issue?

Link to comment
Share on other sites

A simple INSERT INTO affects one row at a time. It looks like you're trying to insert 4 rows? Try this:INSERT INTO dialer.DNC (`phone`)VALUES (72091), (73321), (73378), (112717)Now: as written, you are inserting these values as integers. But I see the references to dialer and phone, and I wonder if you'd do better to insert them as varchars?

Link to comment
Share on other sites

A simple INSERT INTO affects one row at a time. It looks like you're trying to insert 4 rows? Try this:INSERT INTO dialer.DNC (`phone`)VALUES (72091), (73321), (73378), (112717)Now: as written, you are inserting these values as integers. But I see the references to dialer and phone, and I wonder if you'd do better to insert them as varchars?
hi Dad Deirdre :) i can't just change the field by myself though i also accept the fact that i'm not that familiar with varchar in SQL :) nevertheless, is it possible or is their such a way a command line i can issue which make those number to be inserted not to be individually inputted with parenthesis "( )" symbol ... but as a whole separated only by comma (,)?i mean i think its very tiresome if if going to do it individually. good thing for now it has only less data. but i'm sure come a time when lots of number will be entry into the dB.hoping to be assisted.cheers! :)
Link to comment
Share on other sites

Hi, your post doesn't says in what language you're trying to execute this query.if there is a language, there should be a function to convert a string into an array then walk the arrayforeach value in the array do an insert.in the other hand if you are trying to execute this query directly in your db ..... well, i dunno

Link to comment
Share on other sites

Hi, your post doesn't says in what language you're trying to execute this query.if there is a language, there should be a function to convert a string into an array then walk the arrayforeach value in the array do an insert.in the other hand if you are trying to execute this query directly in your db ..... well, i dunno
hello alexnofue :) language? i'm not just so sure what u mean also by language (just hoping u can give me an example of a language or a hint so at least i can give feed back).however, i'm using phpmyadmin/querywindow.php. as i said, the ques i asked are in real or actual mode ... i insert numbers into the table but its so tiresome if i do it individually. thats why i request for an assistance in here.nevertheless, Dad Deirdre recommedation really works great. and i'm not just so thankful of him but to all who have contributed to my inquiries.but it will be great if i can do it in ways with less repeatation of commands.cheers! :)
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...