Re: Problems porting from MySQL Server to MSSQL7 Server

From: Date: Wed, 04 Apr 2001 22:51:02 +0000
Subject: Re: Problems porting from MySQL Server to MSSQL7 Server
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-47139@lists.php.net to get a copy of this message
my_update("update sometable set col1=".$var1." where col2=".$var2); and function: function my_update($query){ global $host,$user,$psw,$name; $conn=mssql_pconnect($host,user,psw) or die("Error: connection failed!"); $rdb=mssql_select_db($name,$conn) or die("Error: DB does not exist"); $rez_q=mssql_query($query,$conn) or die("Error: Invalid SQL"); } The same code and function work fine in MySQL. Why doesn't work in MSSQL Server??? You need to fully examine your SQL statements against the format that MSSQL wants to see.

« previous php.general (#47139) next »