[Bugfix] Multi-user sync -> MSSQL

Hi guys

I tried to implement the Multi-user sync in my App which communicates with an MSSQL-Server 2005.

There is a problem with the field “user” in the table “actions_table”.
I always got the error

mssql_query() [<a href='function.mssql-query'>function.mssql-query</a>]: message: Incorrect syntax near the keyword 'USER'. (severity 15) at /var/www/html/andytest/ipconcept/db_connector/codebase/db_mssql.php line 22

user is a keyword in MSSQL that’s why you have to put it in brackets in an SQL-Query if you want to use it as a fieldname.
MSDN MSSQL Keywords: msdn.microsoft.com/en-us/library … 05%29.aspx

My bugfix looks like this:
in the file db_mssql.php after Line 19:

public function query($sql){

put this to replace USER by [USER] in all SQL-Queries:


Maybe you can fix this in a next version. Thank you

Thanks for the info, we will check how it can be included in the next version of the library.