Tab delimited issue - please help!
Posted 20 April 2006 - 11:25 AM
Trying to load a tab-delimited file to a MySql database, but getting the error message:
INSERT INTO test (first_name, last_name, department, dob) VALUES ('')Column count doesn't match value count at row 1
But I have the same amount of columns in my table as I do in my tab-delimited file being uploaded. I've also echoed out the query, but still don't understand. Can anyone please advise by looking at the code below – especially my INSERT into statement?
oh and here's the code
(Edit - won't let me post the code for some reason so a link can be found) [a href=\"http://www.thisisslough.com/code.txt\" target=\"_blank\"]HERE[/a]
Posted 20 April 2006 - 11:52 AM
The query should have the values entered or left blank atleast.
The right query would be
INSERT INTO test (first_name, last_name, department, dob) VALUES ('','','','');
Just note that when you explicitly mention the parameters of the insert statement, then you should mention the corresponding values also.
Please refer to th mysql manual & have a look at the insert SYNTAX.
Posted 20 April 2006 - 11:56 AM
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users