Re: mssql insert

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>$query = "INSERT INTO myTable VALUES ('".$myVar."');';
Check the commas?
Miles

At 05:50 PM 3/28/2004 +1200, Martin Ryan wrote:
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

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux