Subject: Get created_at
Hi,
I'm fairly new to PHP-ActiveRecord and I want to grab the created_at or updated_at field from the database.How do I do that?
Thanks in advance.
Just grab the object and then you can use it as you want. It's an object itself, so be aware of that.
1 $something = Something::find_by_id($id); 2 3 if($something ->created_at) echo $something ->created_at->format("n/j/Y");
(1-1/1)
June 27 2010
September 23, 2011
Subject: Get created_at
Hi,
I'm fairly new to PHP-ActiveRecord and I want to grab the created_at or updated_at field from the database.
How do I do that?
Thanks in advance.