ID: 29171 Updated by: [EMAIL PROTECTED] Reported By: alain at samoun dot com -Status: Open +Status: Bogus Bug Type: COM related Operating System: windows XP Pro PHP Version: 5.0.0 New Comment:
This is intended behaviour. It's better for you this way :-) Previous Comments: ------------------------------------------------------------------------ [2004-07-26 17:22:24] msisolak at yahoo dot com This appears to be an issue with how ADOdb interacts with the new Variant object in PHP5 (not using variant_date_to_timestamp when pulling in a date value). See follow-up in ADOdb forum: http://phplens.com/lens/lensforum/msgs.php?id=10253 ------------------------------------------------------------------------ [2004-07-15 01:35:39] alain at samoun dot com Description: ------------ Problem getting TimeStamp data from Access database XP Pro - PHP 5.0.0 ADODB 2.7 Seems to be a casting problem: Instead of getting for example: 7/7/2004 4:58:10 PM (A Date/Time data type in Access) we get no data in PHP 5. PHP4.3 gets it correctly. Reproduce code: --------------- <?PHP $table= "FORM_ID_274274176"; #Initialize the Database include("adodb.inc.php"); include("adodb-exceptions.inc.php"); #Catch exeptions in PHP5 include("tohtml.inc.php"); $db = &ADONewConnection("ado_access"); #Access database $access = 'C:\Program files\forms3\forms32k.mdb'; $myDSN='PROVIDER=Microsoft.Jet.OLEDB.4.0;' . 'DATA SOURCE=' . $access . ';'; //. 'USER ID=;PASSWORD=;'; @$db->pConnect($myDSN, "", "", ""); #Query Access $query = "SELECT TimeStamp,A,B FROM $table where A ='TOYOTA'"; $result = $db->Execute($query) or die("Error in query: $query. " . $db->ErrorMsg()); echo rs2html($result); ?> Expected result: ---------------- TimeStamp A B 7/7/2004 4:58:10 PM TOYOTA NISSAN 7/7/2004 4:59:00 PM TOYOTA 2 Actual result: -------------- TimeStamp A B Thu 01, Jan 1970 TOYOTA NISSAN Thu 01, Jan 1970 TOYOTA Note the actual value for the TimeStamp variable is 0, I suppose the "Thu 01, Jan 1970" is a default? ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=29171&edit=1