From:             [EMAIL PROTECTED]
Operating system: FreeBSD-4.4
PHP version:      4.1.1
PHP Bug Type:     MSSQL related
Bug description:  datetime fields returns "    :" string instead of field's value

<?
  $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 bug report at: http://bugs.php.net/?id=15170&edit=1


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to