If you're using Propel, the following code should do the trick:

$criteria = new Criteria();
$criteria->
   add(TransactionPeer::USER_ID, 28)->
   add(TransactionPeer::CREATED_AT, "created_at BETWEEN '3/2/2008  
12:00:00 AM' AND '3/3/2009 11:59:59 PM'", Criteria::CUSTOM)
;
$transactions = TransactionPeer::doSelect($criteria);

Kris

--

Kris Wallsmith | Community Manager
kris.wallsm...@symfony-project.com
Portland, Oregon USA

http://twitter.com/kriswallsmith

On Mar 4, 2009, at 5:58 PM, janlar...@gmail.com wrote:

>
> hi all im a new user of sysmfony i hope can help me to translate this
> statement to symfony
>
>
> SELECT * FROM transactions WHERE user_id = 28 AND created_at BETWEEN
> '3/2/2008 12:00:00 AM ' AND '3/3/2009 11:59:59 PM '
>
>
> Thanks,
>
> >


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to