Re: PHP4/mssql_query INSERT problems
| From: | John Coder | Date: | Tue, 16 Jul 2002 01:29:23 +0000 |
| Subject: | Re: PHP4/mssql_query INSERT problems | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-20567@lists.php.net to get a copy of this message | ||
On Mon, 2002-07-15 at 21:01, Salve Tinkerworth wrote:
> Why do I keep getting messages like:
>
> INSERT INTO OPS (CampaignID,[Description],PhoneInventory,URLInventory)
> VALUES (463,'In and Out','','')
> Warning: MS SQL message: Line 1: Incorrect syntax near '463'. (severity 15)
> in c:\inetpub\wwwroot\intranet2\ccp\campaign_edit.html on line 62
>
> Warning: MS SQL: Query failed in
> c:\inetpub\wwwroot\intranet2\ccp\campaign_edit.html on line 62
>
> for a simple insert like:
>
> $sql2="INSERT INTO OPS
> (CampaignID,[Description],PhoneInventory,URLInventory) VALUES
>
> ($new_campaignid,'$Description','$PhoneInventory','$URLInventory')";
Try ('$new_campaignid',....) instead
<snip>