ID: 12655 Comment by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] Status: Closed Bug Type: MSSQL related Operating System: Win2k PHP Version: 4.0.6 New Comment:
i've found the problem. The fix only fixed the problem for the normal datetime columntype. You'll need to do the same trick for smalldatetime columntype. It's very easy to reproduce. 1. create a table with 2 columns. set the first column to be datetime, and the second to be smalldatetime. 2. set the mssql.datetimeconvert to 0. 3. Insert a value. 4. do a select * from the table you'll notice that column1 has different formatting then colum2. i've tested this with php 4.2.3 and php 4.3.0-RC2. both have the 'bug'. Previous Comments: ------------------------------------------------------------------------ [2002-12-08 16:52:49] [EMAIL PROTECTED] i'm using php 4.2.3 and i'm still having this problem ;( where can i get php 4.2.0 so i can test if that version works ? ------------------------------------------------------------------------ [2002-04-23 14:12:43] [EMAIL PROTECTED] I wrote a patch wich has been commitef by fmk, it is php4.2 one of the latest version of php_mssql.c php_mssql.h have a patch for this problem, because the function dbconvert() of the MSSQL-Client-Api wich is used for converting the datetime-values does wired things. There is a new option in the php.ini called mssql.datetimeconvert if set to Off then the datetime values are returned in the format YYYY-MM-DD HH:MM:SS. This patch is also in php4.2 ------------------------------------------------------------------------ [2002-04-22 17:44:18] [EMAIL PROTECTED] Reopen if you have the same problem with 4.2.0 (released today) ------------------------------------------------------------------------ [2002-04-22 15:02:18] [EMAIL PROTECTED] I created a patch and submitted to php-dev group. Didn't get much reponse so I started looking at CVS and found that a change was checked in 6 months ago for this problem, but wasn't put in to the 4.1.0 to 4.1.2 code bases. The fix should be in 4.2. Steve Dillon ------------------------------------------------------------------------ [2002-04-16 14:06:03] [EMAIL PROTECTED] Same problem. I need access to at least the Seconds fields as we are processing telephone billing records. Hard to bill to the seconds when you can only query minutes. Will probably have to go back to ODBC db driver, or look at making a custom patch in my PHP_MSSQL.dll. Steve Dillon ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/12655 -- Edit this bug report at http://bugs.php.net/?id=12655&edit=1