Forum Moderators: coopster
// Insert data into mysql
mysql_query("INSERT INTO table VALUES ( '$VendorID', '$Type', '$FirstName', '$LastName', '$httpCode' )");
I the PHPmyAdmin it won't let me insert with the auto increment field, ERROR: 1136 Column count doesn't match value count at row 1
mysql_query("INSERT INTO table (`vendor_id`,`type`,`name_first`,`name_last`,`http_code`) VALUES ( '$VendorID', '$Type', '$FirstName', '$LastName', '$httpCode' )");
INSERT INTO `table` ( `VendorID` , `Type`,`FirstName`,`LastName`,`httpCode` ) VALUES ( '$VendorID', '$Type', '$FirstName', '$LastName', '$httpCode' );
php page this worked:
mysql_query("INSERT INTO table (`VendorID`,`Type`,`FirstName`,`LastName`,`httpCode`) VALUES ( 'VendorID', 'Type', 'FirstName', 'LastName', 'httpCode' )");
It appears my error was the ` vs '