Bug #15170 Updated: datetime fields returns " :" string instead of field's value

From: Date: Wed, 23 Jan 2002 04:31:53 +0000
Subject: Bug #15170 Updated: datetime fields returns " :" string instead of field's value
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-77854@lists.php.net to get a copy of this message
ID: 15170 User updated by: royal@altech.com.pl Old Summary: datetime fields returns " :" string instead of field's value Reported By: royal@altech.com.pl Status: Open Bug Type: MSSQL related Operating System: FreeBSD-4.4 PHP Version: 4.1.1 New Comment: I temporarly worked around the problem by using CAST(DATE_FIELD AS VARCHAR(256)) AS DATE but this is not a solution. Previous Comments: ------------------------------------------------------------------------ [2002-01-22 13:56:01] royal@altech.com.pl <? $msid=mssql_connect ($server,$user,$pass); mssql_select_db("database", $msid); $msres=mssql_query("SELECT * FROM TABLE", $msid); $ret=mssql_fetch_row($msres); // or $ret=mssql_fetch_array($msres); // or $ret=mssql_fetch_object($msres); // or $ret=mssql_fetch_field($msres,23); // or $ret=mssql_result ($msres, 0, 23); var_dump($ret); ?> every field is returned correctly except of 'datetime' type fields which instead turns to be string(4) containing " :" or hexadecimally: x20x20x20x3a. I use freetds 0.53 connecting to MSSQL 7.0 server. The 'sqsh' tool works correct. It seems the problem exists in PHP code. It doesn't matter if I use sybase_* or mssql_* functions, the results are the same! configure line (taken from phpinfo()): './configure' '--with-apxs=/usr/local/sbin/apxs' '--with-config-file-path=/usr/local/etc' '--enable-versioning' '--with-system-regex' '--disable-debug' '--enable-track-vars' '--without-gd' '--without-mysql' '--with-gd=/usr/local' '--with-freetype-dir=/usr/local' '--with-jpeg-dir=/usr/local' '--with-png-dir=/usr/local' '--with-zlib' '--with-mcrypt=/usr/local' '--with-mhash=/usr/local' '--with-imap-ssl=/usr/local' '--with-mysql=/usr/local' '--with-sybase=/usr/local' '--with-ldap=/usr/local' '--with-xml' '--with-expat-dir=/usr/local' '--enable-xslt' '--with-xslt-sablot' '--with-expat-dir=/usr/local' '--enable-ftp' '--with-curl=/usr/local' '--with-gettext=/usr/local' '--with-iconv=/usr/local' '--with-pspell=/usr/local' '--with-ming=/usr/local' '--enable-sockets' '--enable-trans-sid' '--with-imap=/usr/local' '--with-iconv=/usr/local' '--prefix=/usr/local' 'i386--freebsd4.4' ------------------------------------------------------------------------ Edit this bug report at http://bugs.php.net/?id=15170&edit=1

« previous php.dev (#77854) next »