ID: 15170 Updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] -Status: Open +Status: Feedback Bug Type: MSSQL related Operating System: FreeBSD-4.4 PHP Version: 4.1.1 New Comment:
Please try using this CVS snapshot: http://snaps.php.net/php4-latest.tar.gz For Windows: http://snaps.php.net/win32/php4-win32-latest.zip Previous Comments: ------------------------------------------------------------------------ [2002-04-02 22:04:36] [EMAIL PROTECTED] The PHP version 4.1.2 on FreeBSD-4.5 has the same bug ------------------------------------------------------------------------ [2002-01-22 23:31:52] [EMAIL PROTECTED] I temporarly worked around the problem by using CAST(DATE_FIELD AS VARCHAR(256)) AS DATE but this is not a solution. ------------------------------------------------------------------------ [2002-01-22 13:56:01] [EMAIL PROTECTED] <? $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