LegendFTW Posted February 20, 2011 Posted February 20, 2011 Errors I get: QUERY ERROR: Column count doesn't match value count at row 1 Query was INSERT INTO imremovelogs VALUES ('', 1, 1, 1, 60, 167, unix_timestamp(), 'izzypod5 removed a Mini Roxi from the car market belonging to ID 1.') QUERY ERROR: Column count doesn't match value count at row 1 Query was INSERT INTO imbuylogs VALUES ('', 1, 1, 5, 2800, 60, 168, unix_timestamp(), 'thedaddy bought a Mini Roxi from the car market for $2800 from user ID 1') and here is the code which I need fixed: $db->query("INSERT INTO imbuylogs VALUES ('', {$r['cmCAR']}, {$r['cmADDER']}, $userid, {$r['cmPRICE']}, {$r['cmID']}, $i, unix_timestamp(), '{$ir['username']} bought a {$r['carNAME']} from the car market for \${$r['cmPRICE']} from user ID {$r['cmADDER']}')", $c); print "You bought the {$r['carNAME']} from the market for \$".number_format($r['cmPRICE'])."."; $db->query("INSERT INTO imremovelogs VALUES ('', {$r['cmCAR']}, {$r['cmADDER']}, $userid, {$r['cmID']}, $i, unix_timestamp(), '{$ir['username']} removed a {$r['carNAME']} from the car market belonging to ID {$r['cmADDER']}.')", $c); $db->query("DELETE FROM carmarket WHERE cmID={$_GET['ID']}",$c); I think it might be something to do with the unix timestamp but not sure so i posted here please help :) Quote
rulerofzu Posted February 20, 2011 Posted February 20, 2011 Column count doesnt match means exactly what it says. Check your database tables and match up each field with what your trying to insert. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.