hi
i think this should work
$this->howManyToPage = 6;
$c = new Criteria();
$criterion = $c->getNewCriterion(WeblogPeer::CATEGORY, 'general',
Criteria::NOT_EQUAL);
$criterion->addAnd($c->getNewCriterion(WeblogPeer::CATEGORY, 'featured',
Criteria::NOT_EQUAL););
// $criterion->addOr(
to see the executed queries you can have a look here:
http://forum.symfony-project.org/index.php/t/18373/
greets
Sven
Lawrence Krubner schrieb:
> I have this code:
>
> $this->howManyToPage = 6;
> $c = new Criteria();
> $c->add(WeblogPeer::CATEGORY, "general", Criteria::NOT_EQUAL);
getNewCriterion() ???
Where is this documented?
On Apr 22, 11:40 pm, Dheeraj Kumar Aggarwal
wrote:
> hi
> i think this should work
>
> $this->howManyToPage = 6;
> $c = new Criteria();
> $criterion = $c->getNewCriterion(WeblogPeer::CATEGORY, 'general',
> Criteria::NOT_EQUAL);
> $
Here:
http://propel.phpdb.org/docs/user_guide/chapters/FindingObjects.html#FindingRecods.Criteria
greets
Sven
Lawrence Krubner schrieb:
> getNewCriterion() ???
>
> Where is this documented?
>
>
> On Apr 22, 11:40 pm, Dheeraj Kumar Aggarwal
> wrote:
>> hi
>>i think this should work
>>
>>
Thanks much for this. I wish Criteria/Propel was better documented.
On Apr 22, 11:40 pm, Dheeraj Kumar Aggarwal
wrote:
> hi
> i think this should work
>
> $this->howManyToPage = 6;
> $c = new Criteria();
> $criterion = $c->getNewCriterion(WeblogPeer::CATEGORY, 'general',
> Criteria:
It's important to know how Criterion works, but in this particular
case you'd better simply use IN operator :
$c = new Criteria();
$c->add(WeblogPeer::CATEGORY, array("general", "featured"),
Criteria::IN);
$c->add(WeblogPeer::ACTIVE, "0", Criteria::NOT_EQUAL);
$c->addDescendingOr
I thought I would just point out.
$c->add(WeblogPeer::CATEGORY, "general", Criteria::NOT_EQUAL);
$c->add(WeblogPeer::CATEGORY, "featured", Criteria::NOT_EQUAL);
Those statements do not create an OR or an AND. In fact what happens is that
the second one over writes the first because they both
This can be very helpful in such situations:
Propel Criteria Builder
http://propel.jondh.me.uk/
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"symfony users" group.
To post to this group, send email to symfony-user