php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #9855 Return column data with correct type
Submitted: 2001-03-20 00:04 UTC Modified: 2001-06-30 15:25 UTC
From: ron dot baldwin at sourceprose dot com Assigned:
Status: Closed Package: MSSQL related
PHP Version: 4.0.4pl1 OS: Windows 2000
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
14 + 50 = ?
Subscribe to this entry?

 
 [2001-03-20 00:04 UTC] 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)?

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-06-30 15:25 UTC] 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.
 [2003-05-30 06:58 UTC] slopez at patasoft dot com
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.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 19:01:28 2024 UTC