This is going to be a quick one – something I ran into whilst making this website. There’s mention of it in the POG google group, though not a lot, and only brief explanations for those new to PHP to work with! So here it is.
The following code gets all pets whose breed is ‘dog’, and whose age is under 5:
$petList = $pet->GetList(array(array("breed", "=", "dog"), array("age", ">", 3)));
What if you wanted all pets whose breed is ‘dog’, OR any pet whose age is under 5? You would write this instead:
$petList = array_merge($pet->GetList(array(array("breed", "=", "dog"))), ($pet->GetList(array(array("age", ">", 3)))) ;
And there we have it – the trick is ‘array_merge’. I’m hoping this may have saved you a little time!
Update!
To clarify... I've rebuilt since then, this is no longer php. The Django framework now powers Assorted Scribbles.
