insert into table_name (colm1, colm2, colm3, colm5) VALUES (‘’,‘’,‘’,‘’);
But it gives me the following error:
Column count doesn’t match value count at row 1
After googling around a bit, It seems that I must include all columns from the table in the insert. Is that correct? So I cannot omit colm4, even if it is going to be null?
I can try that, but thought it is not needed as it is of type int. Will give it a shot tho and let you guys know. But I am thinking its a comma or something missing somewhere as to way its complaining about columns, etc
That query is fine. I created that table and ran it, no error.
Which means that one or more of those variables contains a value with unescaped single quotes. You need to call mysql_real_escape_string on each of those values before putting them in the query.