[Symfony] Propel Criteria Note


When we want to use a sql to get rows between two dates, we can use like this:
$crit1 = $c->getNewCriterion( AppEventPeer::CREATED_AT, $end, Criteria::LESS_THAN );
$crit2 = $c->getNewCriterion( AppEventPeer::CREATED_AT, $start, Criteria::GREATER_THAN );
$crit1->addAnd( $crit2 );
$c->add( $crit1 );

Tags:

Related Posts

Information and Links

Join the fray by commenting, tracking what others have to say, or linking to it from your blog.


Other Posts
Hello, Leopard!
ERA

Write a Comment

Take a moment to comment and tell us what you think. Some basic HTML is allowed for formatting.

Reader Comments

Be the first to leave a comment!