Created
February 17, 2013 04:40
-
-
Save AstDerek/4970210 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// No model, but ORM | |
if ($assessment->startdate > $now || $assessment->enddate < $now)) { | |
// Assessment is expired | |
} | |
// Model and ORM, example | |
if ($assessment->expired_at_date($now)) { | |
// Assessment is expired | |
} | |
/** | |
* Example on how to insert new values into the DB using Active Record | |
*/ | |
$new_assessment = new Assessment; | |
$new_assessment->some_property = 'some value'; | |
$new_assessment->save(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment