Jump to content

DB Error: syntax error


amarkabove

Recommended Posts

here is the php code that is giving me the error. i am using mysql 5 and php5

 

$db->query('INSERT INTO Business (Primary, Company, ConName, Street, Mailing, City, State, Zip, Phone, AltNum, Fax,

Email, Website, Promo, ZipCodes, ConPhone, ConAlt, ConFax, ConEmail, Trim, Moving, Fert, Planting, Health,

Removal, Lightning, Cable, Grinding, Root, Fire, Beetle, Disposal, Affiliations, Insured, InsCompany, WebPage,

WebName, Advertisement, Agree, Signed, Dated, Amount, Card, CardNum, ExDate, CardName, BillAddress, CityState,

CardZip, Security, Membership)

VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)',

array($primary_ID,$_POST['CompanyName'],$_POST['CompanyContact'],$_POST['StreetAddress'],$_POST['MailAddress'],

$_POST['City'],

$_POST['State'],$_POST['Zip'],$_POST['PhoneNumber'],$_POST['AltNumber'],$_POST['Fax'],$_POST['Email'],$_POST['Website'],

$_POST['PromotionalCode'],$_POST['zipcoderequest'],$_POST['CompanyPreference'],$_POST['AltPreference'],

$_POST['FaxPreference'],$_POST['electronicmailPreference'],$Trimming,$Moving,$Fertilization,$Planting,$Health,$Removal,

$Lightning,$Cabling,$Stump,$Root,$Fire,$Beetle,$Byproducts,$_POST['additionalinfo'],$insuranceyes,$_POST['Insurance'],

$webpageyes,$_POST['Webpage'],$_POST['Referredby'],$agree,$_POST['Signed'],$_POST['Date'],$_POST['TotalAmount'],

$_POST['CreditCard'],$_POST['CardNumber'],$_POST['ExpDate'],$_POST['CardholderName'],$_POST['Street'],

$_POST['CityState'],

$_POST['CardZip'],$_POST['SecurityCode'],$_POST['Application']));

Link to comment
https://forums.phpfreaks.com/topic/93748-db-error-syntax-error/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.