[symfony-users] Re: Help me for writing criteria

2009-10-21 Thread Avani
ya.. it's working Thanks Gareth.. :) On Oct 21, 12:12 pm, Gareth McCumskey gmccums...@gmail.com wrote: $exploded_query = explode( , $this-query); $k-getNewCriterion( sfGuardUserProfilePeer::FIRST_NAME,%.$exploded_query[0].%,Criteria::LIK­E) $k-getNewCriterion(

[symfony-users] Re: Help me for writing criteria

2009-10-21 Thread HAUSa
Maybe this helps? http://propel.jondh.me.uk/ On 21 okt, 09:45, Avani avani.v.puj...@gmail.com wrote: ya.. it's working Thanks Gareth..  :) On Oct 21, 12:12 pm, Gareth McCumskey gmccums...@gmail.com wrote: $exploded_query = explode( , $this-query); $k-getNewCriterion(

[symfony-users] Re: Help me for writing criteria

2009-10-21 Thread Gareth McCumskey
You will of course need to have checks to make sure that $exploded_query[1] exists before using it, my example was just a quick way to point you in the right direction On Wed, Oct 21, 2009 at 9:45 AM, Avani avani.v.puj...@gmail.com wrote: ya.. it's working Thanks Gareth.. :) On Oct 21,

[symfony-users] Re: Help me for writing criteria

2009-10-21 Thread Avani
yes. I did like this $exploded_query = explode( , $this-query); if(count($exploded_query) 1) { $k3=$k-getNewCriterion(sfGuardUserProfilePeer::FIRST_NAME,%. $exploded_query[0].%,Criteria::LIKE); $k3-addOr($k-getNewCriterion(sfGuardUserProfilePeer::LAST_NAME,%.

[symfony-users] Re: Help me for writing criteria

2009-10-20 Thread Gareth McCumskey
$exploded_query = explode( , $this-query); $k-getNewCriterion( sfGuardUserProfilePeer::FIRST_NAME,%.$exploded_query[0].%,Criteria::LIKE) $k-getNewCriterion( sfGuardUserProfilePeer::LAST_NAME,%.$exploded_query[1].%,Criteria::LIKE) On Wed, Oct 21, 2009 at 5:25 AM, Avani avani.v.puj...@gmail.com