View Single Post
Old 11-21-2012, 05:11 PM   PM User | #2
Fou-Lu
God Emperor


 
Fou-Lu's Avatar
 
Join Date: Sep 2002
Location: Saskatoon, Saskatchewan
Posts: 15,661
Thanks: 4
Thanked 2,452 Times in 2,421 Posts
Fou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to all
That's interesting; it maps a datetime object to the results of the fetch? I'm not sure if I like that, let me verify in the api.
The API doesn't indicate that it does this, but what you have here looks that it does. The solution is simple, you need to give it a format: $result['DateEntered']->format('F j Y, h:i:s') for example.
Also, make sure you move the end } from the isset check to after the while loop. Otherwise it will throw an error on the fetch since $resource won't be defined as a valid sql resource.
Fou-Lu is offline   Reply With Quote