Hi Community of DANIWEB, first time here, first post below...and I'm pretty new at this as well. I'm getting this error "Column count doesn't match value count at row 1"
My code is:
$insertSQL = sprintf("INSERT INTO tearSheet (".
"compType, ".
"compType2, ".
"report_date, ".
"numEmployees, ".
"cliNumber, ".
"execSummary, ".
"facilities, ".
"growth, ".
"induClass, ".
"priOffice, ".
"gross_revenue, ".
"earnRevenue, ".
"total_assets, ".
"contactsInNego, ".
"fiscalYear, ".
"typeIncorporation, ".
"stateInc, ".
"accountingMet, ".
"contact_person, ".
"buyTitle, ".
"buyEmail, ".
"buyTelephone, ".
"yearEstab) ".
"VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)",
GetSQLValueString($_POST['companyType'], "text"),
GetSQLValueString($_POST['companyType2'], "text"),
'now()',
GetSQLValueString($_POST['numEmployees'], "text"),
GetSQLValueString($_POST['clientNumber'], "text"),
GetSQLValueString($_POST['execSummary'], "text"),
GetSQLValueString($_POST['facilities'], "text"),
GetSQLValueString($_POST['growth'], "text"),
GetSQLValueString($_POST['industryClass'], "text"),
GetSQLValueString($_POST['primaryOffice'], "text"),
GetSQLValueString($_POST['gross_revenue'], "text"),
GetSQLValueString($_POST['earnedRevenue'], "text"),
GetSQLValueString($_POST['total_assets'], "text"),
GetSQLValueString($_POST['contractsInNegotiation'], "int"),
GetSQLValueString($_POST['fiscalYear'], "text"),
GetSQLValueString($_POST['typeIncorporation'], "text"),
GetSQLValueString($_POST['stateIncorporation'], "text"),
GetSQLValueString($_POST['accountingMet'], "text"),
GetSQLValueString($_POST['contact_person'], "text"),
GetSQLValueString($_POST['buyTitle'], "text"),
GetSQLValueString($_POST['buyEmail'], "text"),
GetSQLValueString($_POST['buyTelephone'], "text"),
GetSQLValueString($_POST['yearEstab'], "text"));
mysql_select_db($database_contra, $contra);
$Result1 = mysql_query($insertSQL, $contra) or die(mysql_error());
If you guys please can give some advice, any help is really appreciated.
Philly - boy