note 72035 deleted from function.mssql-query by cmb
| From: | cmb@php.net | Date: | Sun, 23 Jun 2019 14:25:25 +0000 |
| Subject: | note 72035 deleted from function.mssql-query by cmb | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-211378@lists.php.net to get a copy of this message | ||
Note Submitter: php at digitalbacon dot us
----
When using this function on Linux with the FreeTDS dblib driver, some system stored procedures can
return NULL values. This is because Microsoft SQL Server also uses a Windows-specific variant type
in addition to the standard SQL types... like VB & OLE variants. For example:
<?php
// this works fine on Windows (using ntwdblib.dll)
$r = mssql_query(
'SELECT SERVERPROPERTY(\'productversion\')'
);
// but, you might want to do this instead (for Linux portability)
$r = mssql_query(
'SELECT CAST(SERVERPROPERTY(\'productversion\') AS VARCHAR)'
);
?>