mssql insert
| From: | Martin Ryan | Date: | Sun, 28 Mar 2004 05:50:34 +0000 |
| Subject: | mssql insert | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-33671@lists.php.net to get a copy of this message | ||
Got a dumb-ass question for you all. I have got insert queries working with
mssql_query($query); except if any of the variables have two or more words.
For example:
$myVar = "Two or more words";
$query = "INSERT INTO myTable VALUES ('".$myVar."');';
mssql_query($query,$db);
The query will only insert "Two".
I know the query is correct, because I've echoed it, cut it, and pasted it
directly into Query Analyzer and it comes up roses.
Cheers muchly,
Marty