Re: how should MS Access DATETIME be handled in PHP?

From: Date: Thu, 13 Apr 2006 14:35:59 +0000
Subject: Re: how should MS Access DATETIME be handled in PHP?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-233897@lists.php.net to get a copy of this message
Bing Du wrote:
Hello, We have a website which pulls data from its MS Access backend database and publishes the data using Cold Fusion. The Cold Fusion code has '#DateFormat(end_date, "Mmmm d, yyyy")#'. 'end_date' is a table column of type DATETIME in the Access DB. Now, we need to use PHP instead of Cold Fusion to query the same Access database and display the data on the web. Here are the related PHP code snippets. Query the Access DB: $qry = odbtp_query("SELECT end_date,title,projectID FROM projects ORDER BY end_date DESC"); Get the query results: while( ($rec = odbtp_fetch_array($qry)) ) { echo "end_date is $rec[0]<br>";
apparently $rec[0] is a php object - try the following lines to find out what's inside: echo '<pre>'; print_r($rec[0]); echo '<pre>'; that will probably give you a clue as to how to extract some useful info from the object.

« previous php.general (#233897) next »