MSSQL Syntax
| From: | Flint Doungchak | Date: | Wed, 19 Jul 2000 23:51:27 +0000 |
| Subject: | MSSQL Syntax | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-1183@lists.php.net to get a copy of this message | ||
Hi all,
I'm moving from MySql to MSSQL and have a quick syntax question:
Generally, when I perform an update or insert statement with a variable that has
a ' or " I either addslashes (or in this case PHP does it by itself).
My insert statement would then look like this:
$query = "INSERT INTO quest (name,image,descrption,start,expiration,parent)
values
('$name','$image','$description','$start','$expiration','$catid')";
However, MSSQL doesn't seem to like that and I have to use this:
$query = "INSERT INTO quest (name,image,descrption,start,expiration,parent)
values
(\"$name\",'$image',\"$description\",'$start','$expiration','$catid')";
Is that you all's experience as well. Thanks.
-Flint
________________________________________________
Flint Doungchak
Web Applications Development
Net Solutions LLC
840 Lawrence Street
Eugene, OR 97401
VOICE (541) 345-7087 FAX (541) 485-5519
flint@netsolutionsllc.com
www.netsolutionsllc.com