0

The Error code is: [Microsoft][ODBC Driver 13 for SQL Server][SQL Server]Incorrect syntax near the keyword 'order'. ) )

$tsql = "INSERT INTO dbo.order(client,
contact,
vendor,
iteminfo,
ourcost,
ourshipping,
pricequote,
shipquote,
shipinfo,
requestor)
  VALUES (?,?,?,?,?,?,?,?,?,?)";

$params = array(&$_POST['client'],
&$_POST['contact'],
&$_POST['vendor'],
&$_POST['iteminfo'],
&$_POST['ourcost'],
&$_POST['ourshipping'],
&$_POST['pricequote'],
&$_POST['shipquote'],
&$_POST['shipinfo'],
&$_POST['requestor']);

This is just about identical to another table I've got and it works just fine. What am I missing here?

Alex_TCD
  • 23
  • 6

1 Answers1

0

order is a reserved word put it in []'s INSERT INTO dbo.[order](client, or change the name of the table to not use keywords

xQbert
  • 34,733
  • 2
  • 41
  • 62