note 53808 added to function.mssql-connect

From: Date: Tue, 14 Jun 2005 01:00:37 +0000
Subject: note 53808 added to function.mssql-connect
Groups: php.notes 
Request: Send a blank email to php-notes+get-90387@lists.php.net to get a copy of this message
A view that worked fine when queried from any other environment was giving me strange results when queried from PHP. The problem is that the MS SQL database settings are not set to the ANSI defaults as when connecting through Microsoft products. The setting CONCAT_NULL_YIELDS_NULL defaults to ON when connecting with ODBC or SQL Query Analyzer, which complies with the ANSI standard. However, this defaults to OFF when connecting through PHP. There are many other settings which may also need to be explicitly set. <?php mssql_query('SET CONCAT_NULL_YIELDS_NULL ON', $hd); ?> ---- Manual Page -- http://www.php.net/manual/en/function.mssql-connect.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+53808 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+53808&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+53808&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+53808&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+53808&report=yes&reason=useless Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+53808&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+53808&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#90387) next »