Okay I am trying to change an affiliates list from using a flat file to using a mysql database, now i haven't worked with them much and i come up with this error
Column count doesn't match value count at row 1
my source code is attached as it is pretty long any help is appreciated
BTW the table structure is
table list_affill
column 1 = id
column 2 = link
column 3 = username
column 4 = ip addressThe problem is there are four columns in your table, but your inserting only three values. There are two ways you can fix it:
1) use empty single quotes for the id value (it will still autoincrement)
$sql = "INSERT into list_affill VALUES ('','<a href=http://www.htmlforums.com/archive/index.php/\"$name\" target=\"_blank\">$link</a>', '$username', '$ip')";2) specify which columns the values will go into$sql = "INSERT into list_affill (link,username,ip address) VALUES ('<a href=http://www.htmlforums.com/archive/index.php/\"$name\" target=\"_blank\">$link</a>', '$username', '$ip')";thanks for the help
Column count doesn't match value count at row 1
my source code is attached as it is pretty long any help is appreciated
BTW the table structure is
table list_affill
column 1 = id
column 2 = link
column 3 = username
column 4 = ip addressThe problem is there are four columns in your table, but your inserting only three values. There are two ways you can fix it:
1) use empty single quotes for the id value (it will still autoincrement)
$sql = "INSERT into list_affill VALUES ('','<a href=http://www.htmlforums.com/archive/index.php/\"$name\" target=\"_blank\">$link</a>', '$username', '$ip')";2) specify which columns the values will go into$sql = "INSERT into list_affill (link,username,ip address) VALUES ('<a href=http://www.htmlforums.com/archive/index.php/\"$name\" target=\"_blank\">$link</a>', '$username', '$ip')";thanks for the help