#9855 [Com]: Return column data with correct type
| From: | slopez at patasoft dot com | Date: | Fri, 30 May 2003 11:58:02 +0000 |
| Subject: | #9855 [Com]: Return column data with correct type | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-40699@lists.php.net to get a copy of this message | ||
ID: 9855
Comment by: slopez at patasoft dot com
Reported By: ron dot baldwin at sourceprose dot com
Status: Closed
Bug Type: MSSQL related
Operating System: Windows 2000
PHP Version: 4.0.4pl1
New Comment:
I'm looking for a solution to the same problem but under ODBC. I'm
using 4.3.1 but odbc_result keeps returning NULL field values as
boolean(false).
Any directions will be appreciated.
Previous Comments:
------------------------------------------------------------------------
[2001-06-30 15:25:13] fmk@php.net
Update to php4.0.6, and you will find what you are asking for.
The setting mssql.compatability_mode in php.ini can be used to specify
how data are returned.
mssql.compatability_mode = Off Returns data as php types
mssql.compatability_mode = On Returns all data ass strings.
------------------------------------------------------------------------
[2001-03-20 00:04:07] ron dot baldwin at sourceprose dot com
Suggestion:
Add new data retrieval functions (or extend mssql_fetch_array and
mssql_fetch_row) to return each column in a type that matches the
underlying database column type instead of the always as type string.
Also, return columns that are NULL as PHP's null type (instead of
boolean/false).
Two questions - is this the proper place to submit suggestions, and if
so should this also be submitted to the general 'database functions'
category (I know PHP's ODBC functions exhibit the same behavior)?
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=9855&edit=1