I have just recently started working with Microsoft SQL Server 2000, PHP 4.2.1, and Apache 1.3 on a Windows 2000 machine. SQL Server and Apache are on seperate machines. the line of code that is causing problems is:
$releventInfo = mssql_query("SELECT * FROM Titles WHERE Title_Name LIKE '$searchTerm' OR Title_Description LIKE '$searchTerm'", $db);
It is just a simple select statement, nothing fancy. I am able to connect to the server with no problems, and have made several other pages in the past that have done something similar but this code does not work. I get the error message:
Warning: MS SQL message: Unicode data in a Unicode-only collation or ntext data cannot be sent to clients using DB-Library (such as ISQL) or ODBC version 3.7 or earlier. (severity 16)
If I replace $searchTerm with a word instead, I still get the same error. If I execute this code through Query Analyzer (of course replacing $searchTerm) then it executes fine and returns what I want. I have been trying different solutions on and off for a while and am out of ideas. Any help would be appreciated.
Thanks,
-Chris