I\'m looking for the alternative of mysql_real_escape_string() for SQL Server. Is addslashes() my best option or there is another alternative funct
An answer from 2009-02-22T121000 by user chaos doesn't fit all queries.
For example, "CREATE LOGIN [0x6f6c6f6c6f] FROM WINDOWS" will give you an exception.
PS: look at the SQL Server driver for PHP, http://msdn.microsoft.com/library/cc296181%28v=sql.90%29.aspx and the sqlsrv_prepare function, which can binds parameters.
PSS: Which also didn't help you with the query above ;)