ID:               30261
 Updated by:       [EMAIL PROTECTED]
 Reported By:      is01yj at student dot zsu dot edu dot cn
-Status:           Open
+Status:           Bogus
 Bug Type:         COM related
 Operating System: Windows XP
 PHP Version:      4.3.9
 New Comment:

COM in PHP 4.x is no longer supported (except in exchange for $$$), and
we recommend that you upgrade to PHP 5 where you have already noticed
that it works so much better.



Previous Comments:
------------------------------------------------------------------------

[2004-09-28 07:52:22] is01yj at student dot zsu dot edu dot cn

Description:
------------
This summer vacation I used COM(in PHP 5.0.1) to call ADODB in order to
read some data from an Access Database. The database contained some
fields in date type. Everything just ran well.
Later, I removed my pages to another server using PHP 4.3.9 and I found
the data in date type can not be read correctly.
Should I just update PHP on this server to version above 5.0 in order
to solve this problem? 

Reproduce code:
---------------
$MM_Conn_STRING="Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=db/xinghaiwww.mdb";
$connection=new COM("ADODB.Connection");
$connection->open($MM_Conn_STRING);
$rs=new COM("ADODB.RecordSet");
$strsql="select top 5 * from order by article_postdate desc";
$rs->open($strsql,$connection, 1, 1);

while (!$rs->eof) {
     $timestr=$rs->fields['article_postdate']->value;
//'article_postdate' is a field in date type
//.........
//ouput $timestr

Expected result:
----------------
in php 5.0.1, $timestr should be:
2004-8-26 17:44:58

Actual result:
--------------
in php 4.3.9, it became a string of numbers:
1093513498


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=30261&edit=1

Reply via email to