Re: PHP4, mssql_* and SQL Server 2005

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

 



Hi!

Have you checked that the query is escaped correctly? All single quotes (') needs to be escaped with another single quote, but that has been for MS-SQL all the time so I'll doubt that the problem is escaping.

Another issue I noticed is that SQL Server 2005 handles SMALLDATETIME coulmns slightly different, and the default formatting of the retuned date is in some collations different than in SQL Server 2000. So if you have any queries relying on a where clause that checks a SMALLDATETIME column you might need to adjust the date format.

Migrating to SQL 2005 might also cause some problems with character encoding, since SQL 2005 internally works with Unicode. At least for us who needs other characters than 7-bit ASCII... I had big trouble with moving ISO-8859-15 XML documents to a SQL Server 2005 Unicode server and parsing them into a native XML datatype (which is a really nice feature!), but the problems can be overcomed with a litte extra work...

You could also check that you use the correct protocol version of FreeTDS, if you're running PHP under Linux. I don't know how PHP connects to MS-SQL on Windows though.

Currently I have no other thoughts of what could cause your problems, at least without not being able to actually see the failed queries.

Regards,
Krister Karlström, Helsinki, Finland

Chris wrote:

Please always cc the mailing list so others can offer extra advice/suggestions etc.

Weaver Hickerson wrote:
they work in query analyzer.

ok so the queries aren't the problem.

do you get an error? what is it?

Might need to play with these settings:

http://www.php.net/manual/en/function.mssql-min-error-severity.php
http://www.php.net/manual/en/function.mssql-min-message-severity.php

And they seem to work on a new server I setup for testing that has ZendCore and on which I installed the Microsoft PHP driver and ported the code to that driver. :(

That does seem to point to the driver, not sure what other suggestions I can offer.


--
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